Re: fork() Problem?

Alan Cox (alan@lxorguk.ukuu.org.uk)
Wed, 5 May 1999 03:54:44 +0100 (BST)


> Hi,
> this problem maybe a gcc problem.

No its a programming error

> main() {
> int i=0, *status;

^^^^^^^
uninitialised pointer

> wait(status);

Then you pass it to wait.

Then quite predictibly things go boom

Try

int i=0, status

and

wait(&status)

-
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/