Kory@lemmy.ml to linuxmemes@lemmy.world · 19 days agoTerminating a processlemmy.mlexternal-linkmessage-square95fedilinkarrow-up1794arrow-down144file-text
arrow-up1750arrow-down1external-linkTerminating a processlemmy.mlKory@lemmy.ml to linuxmemes@lemmy.world · 19 days agomessage-square95fedilinkfile-text
minus-squareBjörn Tantau@swg-empire.delinkfedilinkarrow-up7·19 days agoYou can easily make a program unkillable (or to be more precise untermable) on Linux. Here’s a simple bash script that will do that. #!/bin/bash function finish { while true do echo "Can't kill me." sleep 10 done } trap finish EXIT trap finish TERM trap finish INT while true do echo "Still alive." sleep 10 done
You can easily make a program unkillable (or to be more precise untermable) on Linux. Here’s a simple bash script that will do that.
#!/bin/bash function finish { while true do echo "Can't kill me." sleep 10 done } trap finish EXIT trap finish TERM trap finish INT while true do echo "Still alive." sleep 10 done