Re: the different effect of system call fork()

From: Bernd Petrovitsch
Date: Wed Apr 08 2009 - 09:11:48 EST


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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/