开发者

sleep indefinitely

开发者_Python百科I was wondering if there is a statement which I can use to have a program sleep indefinitely (probably using sleep function??). (I am obviously doing this waiting for a signal that is going to be delivered at some time to this process and it will wake it up)


You want pause().

EDIT: The most likely circumstances under which you might want to use pause() will actually cause a race condition, so prefer sigsuspend().


On Unix, see either pause or sigsuspend.


And on Windows use Sleep(INFINITE)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜