Thread

  1. Re: SIGCHLD handler in Postgres C function.

    Giles Lean <giles@nemeton.com.au> — 2001-08-04T00:56:57Z

    > You'll recall the ECHILD exception was installed by Tatsuo after seeing
    > problems on Solaris.  Evidently Solaris uses the auto-reap behavior too.
    > 
    > I'm somewhat surprised that HPUX does not --- it tends to follow its
    > SysV heritage when there's a conflict between that and BSD practice.
    > Guess they went BSD on this one.
    
    If the SysV behaviour of automatically reaping child processes is
    required on HP-UX the handler for SIGCHLD can be set to SIG_IGN.
    When the handler is SIG_DFL the signal will be ignored but child
    processes won't be reaped automatically.  This is the same behaviour
    that Stevens describes for SysVr4.  ("Advanced Programming in the Unix
    Environment", section 10.7.)
    
    What different implementations of system(3) with different settings of
    SIGCHLD is another can of worms, and one I've not investigated. :-)
    
    Regards,
    
    Giles