summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'process.c')
-rw-r--r--process.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/process.c b/process.c
index 4a6f87d03b..25cdc1605b 100644
--- a/process.c
+++ b/process.c
@@ -3580,9 +3580,8 @@ rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), voi
char *errmsg, size_t errmsg_buflen)
{
rb_pid_t pid;
- int err, state = 0;
+ int err;
int ep[2];
- VALUE exc = Qnil;
int error_occurred;
if (status) *status = 0;
@@ -3593,14 +3592,12 @@ rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), voi
return pid;
close(ep[1]);
error_occurred = recv_child_error(ep[0], &err, errmsg, errmsg_buflen);
- if (state || error_occurred) {
+ if (error_occurred) {
if (status) {
rb_protect(proc_syswait, (VALUE)pid, status);
- if (state) *status = state;
}
else {
rb_syswait(pid);
- if (state) rb_exc_raise(exc);
}
errno = err;
return -1;