Uninterruptable process in Windows(or Linux)?

前端 未结 3 706
时光说笑
时光说笑 2020-12-05 12:12

Is there any way to make a program that cannot be interrupted (an uninterrupted program)? By that, I mean a process that can\'t be terminated by any signal, kill comma

3条回答
  •  再見小時候
    2020-12-05 12:25

    You can catch pretty-much any signal or input and stay alive through it, the main exception being SIGKILL. It is possible to prevent that from killing you, but you'd have to replace init (and reboot to become the new init). PID 0 is special on most Unixes, in that it's the only thing that can't be KILL'd.

提交回复
热议问题