mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* process.c (rb_fork_internal): call after_fork only unless
chfunc_is_async_signal_safe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3ffd8a918f
commit
258716bd9d
3 changed files with 16 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Jun 10 11:44:57 2012 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* process.c (rb_fork_internal): call after_fork only unless
|
||||||
|
chfunc_is_async_signal_safe.
|
||||||
|
|
||||||
Sun Jun 10 11:33:01 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
|
Sun Jun 10 11:33:01 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
|
||||||
|
|
||||||
* ext/openssl/ossl_pkey_ec.c
|
* ext/openssl/ossl_pkey_ec.c
|
||||||
|
|
|
@ -2945,6 +2945,7 @@ rb_fork_internal(int *status, int (*chfunc)(void*, char *, size_t), void *charg,
|
||||||
_exit(127);
|
_exit(127);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
if (!chfunc_is_async_signal_safe)
|
||||||
after_fork();
|
after_fork();
|
||||||
close(ep[1]);
|
close(ep[1]);
|
||||||
error_occured = recv_child_error(ep[0], &state, &exc, &err, errmsg, errmsg_buflen, chfunc_is_async_signal_safe);
|
error_occured = recv_child_error(ep[0], &state, &exc, &err, errmsg, errmsg_buflen, chfunc_is_async_signal_safe);
|
||||||
|
|
|
@ -1424,4 +1424,13 @@ class TestProcess < Test::Unit::TestCase
|
||||||
assert_nothing_raised { spawn(*TRUECOMMAND, :new_pgroup=>true) }
|
assert_nothing_raised { spawn(*TRUECOMMAND, :new_pgroup=>true) }
|
||||||
assert_nothing_raised { IO.popen([*TRUECOMMAND, :new_pgroup=>true]) {} }
|
assert_nothing_raised { IO.popen([*TRUECOMMAND, :new_pgroup=>true]) {} }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_sigpipe
|
||||||
|
system(RUBY, "-e", "")
|
||||||
|
with_pipe {|r, w|
|
||||||
|
r.close
|
||||||
|
assert_raise(Errno::EPIPE) { w.print "a" }
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue