Changeset 14156


Ignore:
Timestamp:
Aug 5, 2013, 1:07:23 PM (9 years ago)
Author:
jordan
Message:

(trunk, libT) #5452 'preventing zombies from child scripts' -- fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r14148 r14156  
    1818#else
    1919 #include <process.h>
    20  #define waitpid(pid, status, options)  _cwait (status, pid, WAIT_CHILD)
    2120#endif
    2221#include <unistd.h> /* stat */
     
    20742073onSigCHLD (int i UNUSED)
    20752074{
    2076   waitpid (-1, NULL, WNOHANG);
     2075#ifdef WIN32
     2076
     2077  _cwait (NULL, -1, WAIT_CHILD);
     2078
     2079#else
     2080
     2081  int rc;
     2082  do
     2083    rc = waitpid (-1, NULL, WNOHANG);
     2084  while (rc>0 || (rc==-1 && errno==EINTR));
     2085
     2086#endif
    20772087}
    20782088
Note: See TracChangeset for help on using the changeset viewer.