Message ID | 1458573193-18181-1-git-send-email-adhemerval.zanella@linaro.com |
---|---|
State | New |
Headers | show |
diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c index cb80cea..ee05de5 100644 --- a/sysdeps/unix/sysv/linux/spawni.c +++ b/sysdeps/unix/sysv/linux/spawni.c @@ -381,7 +381,7 @@ __spawnix (pid_t * pid, const char *file, close_not_cancel (args.pipe[0]); - if (!ec && pid) + if ((ec == 0) && (pid != NULL)) *pid = new_pid; __sigprocmask (SIG_SETMASK, &args.oldmask, 0);