signal注册信号陷阱

使用signal注册信号,有可能不会使阻塞套接字被信号打断,请看如下代码: /** * Try to reproduce this issue: * Set an alarm before connect() of blocking socket, connect() won't be * interrupted when this alarm is fired.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章