Shell Script get CTRL+Z with Trap

后端 未结 2 550
感动是毒
感动是毒 2021-01-03 05:40

I am trying to get the SIGSTOP CTRL+Z signal in my script\'s trap.

When my script is executing, if I temporarily suspend

2条回答
  •  自闭症患者
    2021-01-03 06:26

    There are two signals you can't trap*, SIGKILL and SIGSTOP. Use another signal.

    *: without modifying the kernel

    IEEE standard:

    Setting a trap for SIGKILL or SIGSTOP produces undefined results.

提交回复
热议问题