Ticket #978: lighttpd-1.3.14-config-zombies.diff

File lighttpd-1.3.14-config-zombies.diff, 0.6 kB (added by zikzik, 20 months ago)

Patch (works for me)

  • configfile.c

    old new  
    11#include <sys/stat.h> 
     2#include <sys/types.h> 
     3#include <sys/wait.h> 
     4 
    25 
    36#include <stdlib.h> 
    47#include <fcntl.h> 
     
    886889        buffer *source; 
    887890        buffer *out; 
    888891        char oldpwd[PATH_MAX]; 
     892        int childstatus; 
    889893 
    890894        if (NULL == getcwd(oldpwd, sizeof(oldpwd))) { 
    891895                log_error_write(srv, __FILE__, __LINE__, "s", 
     
    912916        buffer_free(source); 
    913917        buffer_free(out); 
    914918        chdir(oldpwd); 
     919         
     920        /* Clean up zombie child  */ 
     921        waitpid( -1, &childstatus, WNOHANG ); 
     922         
    915923        return ret; 
    916924} 
    917925