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.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章