Changeset 11536


Ignore:
Timestamp:
Dec 15, 2010, 3:35:06 PM (11 years ago)
Author:
charles
Message:

(trunk libT) #3764 "script-torrent-done shouldn't block libtransmission" -- handle zombie processes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r11535 r11536  
    1313#include <sys/types.h> /* stat */
    1414#include <sys/stat.h> /* stat */
     15#include <sys/wait.h> /* wait() */
    1516#include <unistd.h> /* stat */
    1617#include <dirent.h>
     
    18511852
    18521853static void
     1854onSigCHLD( int i UNUSED )
     1855{
     1856    waitpid( -1, 0, WNOHANG );
     1857}
     1858
     1859static void
    18531860torrentCallScript( const tr_torrent * tor, const char * script )
    18541861{
     
    18741881
    18751882        tr_torinf( tor, "Calling script \"%s\"", script );
     1883        signal( SIGCHLD, onSigCHLD );
    18761884
    18771885        if( !fork( ) )
Note: See TracChangeset for help on using the changeset viewer.