看板 C_and_CPP 關於我們 聯絡資訊
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) Linux C 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) 問題(Question): 今天我開一個Socket接收packet 但如果沒有packet進來,會停在recvfrom()的while loop 我都是按ctrl + C強制停止 有辦法說,我按強制停止前,先執行 sorting(); store(); 我自己寫的function後,在停止嗎? 謝謝~ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.117.89.77 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1463993270.A.C43.html ※ 編輯: FierceBreast (140.117.89.77), 05/23/2016 16:48:01
Qbsuran: select(), non-block 05/23 17:56
dijkstra: Signal handle 05/23 23:42
steve1012: Non blocking io 05/24 04:56
samuelcdf: https://goo.gl/g6vJpA http://goo.gl/SiJhic 05/24 12:28