Implementing infinite wait in shell scripting

前端 未结 7 558
独厮守ぢ
独厮守ぢ 2021-02-05 04:30

This may sound trivial, but I\'m pretty sure this question hasn\'t been asked, or at least I can\'t find it.

I\'m looking for a way to construct an infinite wait

7条回答
  •  遥遥无期
    2021-02-05 05:20

    SIGTERM sent to a process is delivered by the kernel to the process whether it is sleeping or not.

    Try experimenting, maybe like this (bash example)

    sleep 20 &
    kill $! && fg
    

提交回复
热议问题