Help! SIGCHLD is causing parent to terminate

Discussion in 'C' started by KeithL, Mar 16, 2008.

  1. KeithL

    KeithL New Member

    Joined:
    Mar 16, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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.
    Keith.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice