From: Adhemerval Zanella Date: Mon, 30 May 2016 13:04:47 +0000 (-0300) Subject: posix: Call _exit in failure case for posix_spawn{p} (BZ#20178) X-Git-Tag: glibc-2.24~172 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e040a2d5f59c5494910bd6451b3dcb69221a047;p=thirdparty%2Fglibc.git posix: Call _exit in failure case for posix_spawn{p} (BZ#20178) This patch call _exit instead of exit in failure case for the spawned child in Linux posix_spawn{p} implementation. Tested on x86_64. [BZ #20178] * sysdeps/unix/sysv/linux/spawni.c (__spawni_child): Call _exit on failure instead of exit. --- diff --git a/ChangeLog b/ChangeLog index 042fb893e2c..a33eca3c770 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-05-30 Adhemerval Zanella + + [BZ #20178] + * sysdeps/unix/sysv/linux/spawni.c (__spawni_child): Call _exit + on failure instead of exit. + 2016-05-30 Roland McGrath [BZ #3629] diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c index ee05de5a9bf..bb3eecfde1a 100644 --- a/sysdeps/unix/sysv/linux/spawni.c +++ b/sysdeps/unix/sysv/linux/spawni.c @@ -288,7 +288,7 @@ fail: if (ret) while (write_not_cancel (p, &ret, sizeof ret) < 0) continue; - exit (SPAWN_ERROR); + _exit (SPAWN_ERROR); } /* Spawn a new process executing PATH with the attributes describes in *ATTRP.