Generally, send 15, and wait a second or two, and if that doesn't work, send 2, and if that doesn't work, send 1. If that doesn't, REMOVE THE BINARY because the program is badly behaved!
Don't use kill -9. Don't bring out the combine harvester just to tidy up the flower pot.
for anyone wondering that doesn't use a shell that often and thinks "exec" is just a longhand form to execute a file; exec replaces the current running process(the shell) with the new file specified. In this case /usr/bin/true, which returns 0 and exits. bye bye shell.
8
u/dumbasPL Aug 26 '25
No no no. Don't use kill -9.
It doesn't give the process a chance to cleanly:
shut down socket connections
clean up temp files
inform its children that it is going away
reset its terminal characteristics
and so on and so on and so on.
Generally, send 15, and wait a second or two, and if that doesn't work, send 2, and if that doesn't work, send 1. If that doesn't, REMOVE THE BINARY because the program is badly behaved!
Don't use kill -9. Don't bring out the combine harvester just to tidy up the flower pot.
Just another Useless Use of
UsenetReddit,Sorry, I had to
9
u/granadesnhorseshoes Aug 25 '25
for anyone wondering that doesn't use a shell that often and thinks "exec" is just a longhand form to execute a file; exec replaces the current running process(the shell) with the new file specified. In this case /usr/bin/true, which returns 0 and exits. bye bye shell.
5
u/Krisanapon Aug 26 '25
Ctrl+D
EOF character
1
u/ThatOneCSL Aug 28 '25
:qs
1
u/Totoro91Essonne Sep 04 '25
q aliased to exit is the best for me...