一千萬個為什麽

搜索

在等待系統調用中使用0有什麽用?


The syntax for the wait system call is pid= wait(&var) where pid is the process id of child and var is the variable which will contain the reason for exiting child.
But what happens when we use wait((int *)0)? What does it exactly mean?
Thank you.

最佳答案

這意味著程序員對獲取子退出代碼不感興趣。 (int *)0 表示NULL。

轉載註明原文: 在等待系統調用中使用0有什麽用?

猜你喜歡