Re: fork() Problem?

Alex Buell (alex.buell@tahallah.demon.co.uk)
Wed, 5 May 1999 21:30:30 +0100 (BST)


On Wed, 5 May 1999, Rogier Wolff wrote:

[ code snipped ]

#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>

int main(void)
{
pid_t child;

if (!(child = fork()))
{
printf("In child\n");
exit(0);
}

printf("In parent\n");
return 0;
}

Works for me.

Cheers,
Alex

-- 
"A mind opened by new ideas can never return to its original limits"

http://www.tahallah.demon.co.uk

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