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) |
|---|
-
configfile.c
old new 1 1 #include <sys/stat.h> 2 #include <sys/types.h> 3 #include <sys/wait.h> 4 2 5 3 6 #include <stdlib.h> 4 7 #include <fcntl.h> … … 886 889 buffer *source; 887 890 buffer *out; 888 891 char oldpwd[PATH_MAX]; 892 int childstatus; 889 893 890 894 if (NULL == getcwd(oldpwd, sizeof(oldpwd))) { 891 895 log_error_write(srv, __FILE__, __LINE__, "s", … … 912 916 buffer_free(source); 913 917 buffer_free(out); 914 918 chdir(oldpwd); 919 920 /* Clean up zombie child */ 921 waitpid( -1, &childstatus, WNOHANG ); 922 915 923 return ret; 916 924 } 917 925

