summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-11 03:02:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-11 03:02:36 +0000
commit7307c32f1fb139dea4f3a4cc51738c447ad6f4f3 (patch)
tree7702ca23ae0ca0d5accf05195ccfd520142fb248 /process.c
parent5c100b57f8c2f2513b0cf975d51b44b93a131070 (diff)
process.c: unused variables
* process.c (rb_fork_async_signal_safe): remove initialized but never assigned local variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 4a6f87d..25cdc16 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;