428 |
|
|
429 |
/* input, reading side */ |
/* input, reading side */ |
430 |
if (last_input != -1) { |
if (last_input != -1) { |
431 |
if (close (0) < 0) |
if (dup2 (last_input, 0) < 0) |
432 |
error (FATAL, errno, |
error (FATAL, errno, _("dup2 failed")); |
|
_("close failed")); |
|
|
if (dup (last_input) < 0) |
|
|
error (FATAL, errno, _("dup failed")); |
|
433 |
if (close (last_input) < 0) |
if (close (last_input) < 0) |
434 |
error (FATAL, errno, |
error (FATAL, errno, |
435 |
_("close failed")); |
_("close failed")); |
437 |
|
|
438 |
/* output, writing side */ |
/* output, writing side */ |
439 |
if (output_write != -1) { |
if (output_write != -1) { |
440 |
if (close (1) < 0) |
if (dup2 (output_write, 1) < 0) |
441 |
error (FATAL, errno, |
error (FATAL, errno, _("dup2 failed")); |
|
_("close failed")); |
|
|
if (dup (output_write) < 0) |
|
|
error (FATAL, errno, _("dup failed")); |
|
442 |
if (close (output_write) < 0) |
if (close (output_write) < 0) |
443 |
error (FATAL, errno, |
error (FATAL, errno, |
444 |
_("close failed")); |
_("close failed")); |