[問題] 關於信號量操作
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Linux Kernel 2.6
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
此程式碼是信號量的控制範例(參Linux應用程式設定-使用C這本書,完全Copy下來)
運作時,進入函數printfmode時, 似乎無法讀取arg->buf->sem_perm.mode的值
而造成core dump。但改了很久,還是找不出是那裡出問題。
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
程式碼(Code):(請善用置底文網頁, 記得排版)
http://ideone.com/PvqhDE
補充說明(Supplement):
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 112.104.56.10