Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Client/Server socket communication
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-09-18 (03:14)
From: tim@f...
Subject: Re: [Caml-list] Client/Server socket communication
>Why "server <defunct>" is occurred.
>What do I have to do to correct <defunct> ?

This is a Unix thing, not an OCAML thing.  The child will be defunct
to hold the exit status so it can be reported to the parent when the
parent waits for it, or until the parent exits.

One workaround is to wait for the child process when you expect it to exit.

Another workaround is to fork twice, so the original process is the
parent of a temporary process, and the temporary process is the parent
of the process you really wanted to create.  The temporary process
exits immediately and the original parent waits for it immediately.
This leaves no defunct processes.

Tim Freeman
GPG public key fingerprint ECDF 46F8 3B80 BB9E 575D  7180 76DF FE00 34B1 5C78 
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: