Kory@lemmy.ml to linuxmemes@lemmy.world · 19 days agoTerminating a processlemmy.mlimagemessage-square80fedilinkarrow-up1774arrow-down141file-text
arrow-up1733arrow-down1imageTerminating a processlemmy.mlKory@lemmy.ml to linuxmemes@lemmy.world · 19 days agomessage-square80fedilinkfile-text
minus-squareBonerMan@ani.sociallinkfedilinkarrow-up10arrow-down1·19 days agoBecause that’s better for the software, Linux however kills it outright when it doesn’t respond at all. Windows just… Waits. And you can’t really hardkill the processes from the task manager. Or at last my last knowledge is that.
minus-squareBjörn Tantau@swg-empire.delinkfedilinkarrow-up7·18 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
Because that’s better for the software, Linux however kills it outright when it doesn’t respond at all. Windows just… Waits. And you can’t really hardkill the processes from the task manager. Or at last my last knowledge is that.
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