FC5 system() call

Jakub Jelinek jakub at redhat.com
Fri Sep 22 14:08:58 UTC 2006


On Fri, Sep 22, 2006 at 07:02:06AM -0700, Brian D. McGrew wrote:
> Morning all,
> 
> Using FC3 life is good.  I compile up my code on FC5 with gcc-4.1.1 and
> all of a sudden the system() call is broken.
> 
> The code:
> 
> int num_proc = system("cat /proc/cpuinfo | grep -c processor >> /dev/null 2>&!");

2>&! ?

Are you sure you don't ignore SIGCHLD?  If SIGCHLD is SIG_IGN, then -1
from system would be expected return value.
You haven't provided self-contained testcase, so it is hard to guess...

	Jakub




More information about the fedora-list mailing list