Equivalent of ctrl c in command to cancel a program

前端 未结 6 1984
渐次进展
渐次进展 2020-12-24 00:29

I am running a long linux program in a remote machine, and I want to stop it, but my problem is that if I use the kill command then the program will exit without saving resu

6条回答
  •  轮回少年
    2020-12-24 00:49

    If you control the long-running remote process, you could install a signal handler for SIGTERM (see man signal and man sigaction and the many SO questions on this topic), to cleanup nicely before dieing.

    That is a very common thing to do.

提交回复
热议问题