Lines 347-353
Link Here
|
347 |
{ /* spawn failed */ |
347 |
{ /* spawn failed */ |
348 |
Error("%s: %s", argv[0], strerror(errno)); |
348 |
Error("%s: %s", argv[0], strerror(errno)); |
349 |
Handle_result(-1, ignore, _abort_flg, target); |
349 |
Handle_result(-1, ignore, _abort_flg, target); |
350 |
return(-1); |
350 |
/* Handle_result() aborts dmake if we are not told to |
|
|
351 |
* ignore errors. If we reach the this point return 1 as |
352 |
* errors are obviously ignored and indicate that the process |
353 |
* finished. */ |
354 |
return(1); |
351 |
} else { |
355 |
} else { |
352 |
_add_child(pid, target, ignore, last, wfc); |
356 |
_add_child(pid, target, ignore, last, wfc); |
353 |
} |
357 |
} |
Lines 357-365
Link Here
|
357 |
switch( pid=fork() ){ |
361 |
switch( pid=fork() ){ |
358 |
|
362 |
|
359 |
case -1: /* fork failed */ |
363 |
case -1: /* fork failed */ |
360 |
Error("%s: %s", argv[0], strerror( errno )); |
364 |
Fatal("fork failed: %s: %s", argv[0], strerror( errno )); |
361 |
Handle_result(-1, ignore, _abort_flg, target); |
|
|
362 |
return(-1); |
363 |
|
365 |
|
364 |
case 0: /* child */ |
366 |
case 0: /* child */ |
365 |
/* redirect output for _exec_shell / @@-recipes. */ |
367 |
/* redirect output for _exec_shell / @@-recipes. */ |
Lines 378-384
Link Here
|
378 |
} |
380 |
} |
379 |
} |
381 |
} |
380 |
execvp(argv[0], argv); |
382 |
execvp(argv[0], argv); |
381 |
/* restoring output to catch potential error output. */ |
383 |
/* restoring output to catch potential error output if execvp() |
|
|
384 |
* failed. */ |
382 |
if( old_stdout != -1 ) { |
385 |
if( old_stdout != -1 ) { |
383 |
dup2(old_stdout, 1); |
386 |
dup2(old_stdout, 1); |
384 |
if( old_stderr != -1 ) |
387 |
if( old_stderr != -1 ) |