From: Rich Felker Date: Wed, 12 Feb 2014 06:03:07 +0000 (-0500) Subject: make posix_spawn accept null pid pointer arguments X-Git-Tag: v1.0.0~66 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8011614da008032642aa8292c3fd079bf7a8843d;p=oweals%2Fmusl.git make posix_spawn accept null pid pointer arguments this is a requirement in the specification that was overlooked. --- diff --git a/src/process/posix_spawn.c b/src/process/posix_spawn.c index eb98f9f6..f675a13c 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);