1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2014-12-11 03:02:36 +00:00
parent 5c100b57f8
commit 7307c32f1f

View file

@ -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;