diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-02-12 01:03:07 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-02-12 01:03:07 -0500 |
commit | 8011614da008032642aa8292c3fd079bf7a8843d (patch) | |
tree | 94d8e7e160c0273eb529361d2d838842e0e6da5c /src/process | |
parent | e74f3b0234de9a8e0596166bdfa04af3f031249c (diff) | |
download | musl-8011614da008032642aa8292c3fd079bf7a8843d.zip musl-8011614da008032642aa8292c3fd079bf7a8843d.tar.gz musl-8011614da008032642aa8292c3fd079bf7a8843d.tar.bz2 |
make posix_spawn accept null pid pointer arguments
this is a requirement in the specification that was overlooked.
Diffstat (limited to 'src/process')
-rw-r--r-- | src/process/posix_spawn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/process/posix_spawn.c b/src/process/posix_spawn.c index eb98f9f..f675a13 100644 --- a/src/process/posix_spawn.c +++ b/src/process/posix_spawn.c @@ -166,7 +166,7 @@ int __posix_spawnx(pid_t *restrict res, const char *restrict path, close(args.p[0]); - if (!ec) *res = pid; + if (!ec && res) *res = pid; pthread_sigmask(SIG_SETMASK, &args.oldmask, 0); pthread_setcancelstate(cs, 0); |