2011年4月12日

system() return (10): No child processes

The code includes "signal(SIGCHLD, SIG_IGN); " to prevent process from zombie.
So the wait() is unable to get the signal and system() will return -1.

Solution:
Change from SIG_IGN to SIG_DFL.

In my case, I have to retain signal(SIGCHLD, SIG_IGN), so how to handle well with its return value?

2 意見:

Unknown 提到...
作者已經移除這則留言。
Unknown 提到...
網誌管理員已經移除這則留言。