Skip to content

Commit 0f10341

Browse files
authored
Merge pull request #17 from cfconrad/fix_potential_race_in_sig_child_handler_setup
Fix race of SIG{CHLD} handler setup
2 parents 26ca91d + 59575a2 commit 0f10341

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Mojo/IOLoop/ReadWriteProcess.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ sub _fork {
221221
# Separated handles that could be used for internal comunication.
222222
my ($channel_in, $channel_out);
223223

224+
$self->session->enable;
225+
224226
if ($self->set_pipes) {
225227
$input_pipe = IO::Pipe->new()
226228
or $self->_new_err('Failed creating input pipe');
@@ -337,8 +339,6 @@ sub _fork {
337339
}
338340
$self->process_id($pid);
339341

340-
$self->session->enable;
341-
342342
return $self unless $self->set_pipes();
343343

344344
$self->read_stream($output_pipe->reader) if $output_pipe;

0 commit comments

Comments
 (0)