Messages in this thread | | | Subject | Re: the different effect of system call fork() | From | Bernd Petrovitsch <> | Date | Wed, 08 Apr 2009 15:08:48 +0200 |
| |
Hi!
On Wed, 2009-04-08 at 20:53 +0800, Sino wrote: [...] > I don't know whether this is the right place for this email, but I
It's probably not.
> post it here since it concerns the system call of fork. > here is my fwo source code. > > //fork1.cc [...] > if (pid_t pid = fork() < 0)
I don't think that this line does what you want it to do. Hint: Using a "pid_t" for the boolean result for a comparison seems strange at best.
Bernd -- Firmix Software GmbH http://www.firmix.at/ mobil: +43 664 4416156 fax: +43 1 7890849-55 Embedded Linux Development and Services
| |