Ticket #2185: execunix.c.2.patch
File execunix.c.2.patch, 834 bytes (added by , 13 years ago) |
---|
-
execunix.c
190 190 { 191 191 if ( pipe( out ) < 0 ) 192 192 exit( EXITBAD ); 193 fcntl( out[0], F_SETFL, O_NONBLOCK );194 fcntl( out[1], F_SETFL, O_NONBLOCK );195 193 196 194 if ( pipe( err ) < 0 ) 197 195 exit( EXITBAD ); 198 fcntl( err[0], F_SETFL, O_NONBLOCK );199 fcntl( err[1], F_SETFL, O_NONBLOCK );200 196 } 201 197 202 198 /* Start the command */ … … 232 228 } 233 229 else 234 230 dup2( err[1], STDERR_FILENO ); 231 close( out[1] ); 232 close( err[1] ); 235 233 236 234 /* Make this process a process group leader so that when we kill it, all 237 235 * child processes of this process are terminated as well. We use