… | |
… | |
1087 | } |
1087 | } |
1088 | |
1088 | |
1089 | $SIGPIPE_R |
1089 | $SIGPIPE_R |
1090 | or Carp::croak "AnyEvent: unable to create a signal reporting pipe: $!\n"; |
1090 | or Carp::croak "AnyEvent: unable to create a signal reporting pipe: $!\n"; |
1091 | |
1091 | |
|
|
1092 | # not strictly required, as $^F is normally 2, but let's make sure... |
1092 | fcntl $SIGPIPE_R, &Fcntl::F_SETFD, &Fcntl::FD_CLOEXEC; |
1093 | fcntl $SIGPIPE_R, &Fcntl::F_SETFD, &Fcntl::FD_CLOEXEC; |
1093 | fcntl $SIGPIPE_W, &Fcntl::F_SETFD, &Fcntl::FD_CLOEXEC; |
1094 | fcntl $SIGPIPE_W, &Fcntl::F_SETFD, &Fcntl::FD_CLOEXEC; |
1094 | |
1095 | |
1095 | $SIG_IO = AnyEvent->io (fh => $SIGPIPE_R, poll => "r", cb => \&_signal_exec); |
1096 | $SIG_IO = AnyEvent->io (fh => $SIGPIPE_R, poll => "r", cb => \&_signal_exec); |
1096 | } |
1097 | } |