Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Help! SIGCHLD is causing parent to terminate (http://www.go4expert.com/forums/help-sigchld-causing-parent-terminate-t9382/)

KeithL 16Mar2008 20:27

Help! SIGCHLD is causing parent to terminate
Hi everyone,
This is my first time posting in these forums.

I have built a file transfer application, the server is coded in C (on Solaris), and the client application is coded in Java (on Windows).
The server forks a child for every client, and whenever the client closes the application, the parent process is notified and executes the SIGCHLD handler function.

However, once that function is executed, the parent terminates, and obviously, any incoming connections are then refused.
Is this behaviour typical of the signal handlers, or am I missing something. Is there a possible workaround for it?

Any suggestions are very welcome. Thanks in advance.

All times are GMT +5.5. The time now is 00:27.