system() fails with errno=ECHILD - Unix

This is a discussion on system() fails with errno=ECHILD - Unix ; Hi, We have got a case where a system() function fails with errno=ECHILD. This problem only occurs on a productive system with Linux 2.6.9 and not on Linux 2.4, AIX or Solaris. I know one reason for this is that ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: system() fails with errno=ECHILD

  1. system() fails with errno=ECHILD

    Hi,

    We have got a case where a system() function fails with errno=ECHILD.
    This problem only occurs on a productive system with Linux 2.6.9 and
    not on Linux 2.4, AIX or Solaris.

    I know one reason for this is that SICCHLD is set to SIG_IGN but this
    should not be the case here. SIGCHLD is explicity set to SIG_DFL
    using a sigaction before the call to system(). (Although it is
    normally set to SIG_IGN). There should not be any other threads
    messing about with SIGCHLD.

    I am awaiting an strace file. Does anyone have any suggestions on how
    to fix this in the mean time?

    TIA, Mark.


  2. Re: system() fails with errno=ECHILD

    In comp.unix.programmer Mark wrote:
    > We have got a case where a system() function fails with errno=ECHILD.
    > This problem only occurs on a productive system with Linux 2.6.9 and
    > not on Linux 2.4, AIX or Solaris.


    > I know one reason for this is that SICCHLD is set to SIG_IGN but this
    > should not be the case here. SIGCHLD is explicity set to SIG_DFL
    > using a sigaction before the call to system(). (Although it is
    > normally set to SIG_IGN). There should not be any other threads
    > messing about with SIGCHLD.


    Do you explicitely clear out the sa_flags member of the sigaction
    structure? If not you may accidentally have SA_NOCLDWAIT set in
    there, which basically has the same effect as switching to SIG_IGN.

    Regards, Jens
    --
    \ Jens Thoms Toerring ___ jt@toerring.de
    \__________________________ http://toerring.de

+ Reply to Thread