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