gpt4 book ai didi

linux - 很长时间(约 20 秒)未发送信号

转载 作者:太空狗 更新时间:2023-10-29 11:13:25 29 4
gpt4 key购买 nike

进程从信号处理程序中发送给自身的信号在大约 20 秒内无法传递,然后它被传递了。

可能的原因是什么?

我想知道一般可能的原因。

我正在查看的实际代码是 here

最佳答案

很可能,您正在从信号处理程序中调用一个您不能从该信号处理程序中调用的函数。

详情参见man 7 signal:

Async-signal-safe functions

A signal handler function must be very careful, since processing elsewhere may be interrupted at some arbitrary point in the execution of the program. POSIX has the concept of "safe function". If a signal interrupts the execution of an unsafe function, and handler calls an unsafe function, then the behavior of the program is undefined.

关于linux - 很长时间(约 20 秒)未发送信号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30641980/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com