зеркало из https://github.com/github/ruby.git
process.c: child process error state
* process.c (rb_fork_err): error state in the child process is prior to exceptions in proc_syswait(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
182dc9d40d
Коммит
52c7036436
|
@ -1,4 +1,7 @@
|
||||||
Fri Jun 8 11:26:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Fri Jun 8 12:04:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* process.c (rb_fork_err): error state in the child process is prior
|
||||||
|
to exceptions in proc_syswait().
|
||||||
|
|
||||||
* process.c (rb_fork_err): determine status on errors.
|
* process.c (rb_fork_err): determine status on errors.
|
||||||
|
|
||||||
|
|
|
@ -2874,8 +2874,8 @@ rb_fork_err(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALU
|
||||||
rb_io_close(io);
|
rb_io_close(io);
|
||||||
if (state || size) {
|
if (state || size) {
|
||||||
if (status) {
|
if (status) {
|
||||||
*status = state;
|
|
||||||
rb_protect(proc_syswait, (VALUE)pid, status);
|
rb_protect(proc_syswait, (VALUE)pid, status);
|
||||||
|
if (state) *status = state;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rb_syswait(pid);
|
rb_syswait(pid);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче