]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
posix: Call _exit in failure case for posix_spawn{p} (BZ#20178)
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 30 May 2016 13:04:47 +0000 (10:04 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 30 May 2016 13:56:01 +0000 (10:56 -0300)
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.

ChangeLog
sysdeps/unix/sysv/linux/spawni.c

index 042fb893e2c732cb074f41a5eb54db8ae7510233..a33eca3c7703d57043c7723bb3fd030c8dc78062 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-05-30  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+       [BZ #20178]
+       * sysdeps/unix/sysv/linux/spawni.c (__spawni_child): Call _exit
+       on failure instead of exit.
+
 2016-05-30  Roland McGrath  <roland@hack.frob.com>
 
        [BZ #3629]
index ee05de5a9bf0583378938a09afa686a684861da9..bb3eecfde1a51fb099c103ff988170e56658c63f 100644 (file)
@@ -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.