… | |
… | |
444 | if (epp->len) |
444 | if (epp->len) |
445 | { |
445 | { |
446 | if (dup2 (epn.fd [0], epp->fd [0]) < 0) |
446 | if (dup2 (epn.fd [0], epp->fd [0]) < 0) |
447 | croak ("unable to dup over old event pipe"); /* should not croak */ |
447 | croak ("unable to dup over old event pipe"); /* should not croak */ |
448 | |
448 | |
449 | if (epp->fd [1] != epp->fd [0]) |
|
|
450 | close (epn.fd [0]); |
449 | close (epn.fd [0]); |
|
|
450 | |
|
|
451 | if (epn.fd [0] == epn.fd [1]) |
|
|
452 | epn.fd [1] = epp->fd [0]; |
451 | |
453 | |
452 | epn.fd [0] = epp->fd [0]; |
454 | epn.fd [0] = epp->fd [0]; |
453 | } |
455 | } |
454 | |
456 | |
455 | *epp = epn; |
457 | *epp = epn; |