[PATCH v3 1/6] libport: Don't call exit in the shared library.

Jens Reyer jre.winesim at gmail.com
Fri Oct 7 11:39:21 CDT 2016


From: Michael Gilbert <mgilbert at debian.org>
Signed-off-by: Jens Reyer <jre.winesim at gmail.com>
---
 libs/port/spawn.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libs/port/spawn.c b/libs/port/spawn.c
index 97364e7..c1a95a2 100644
--- a/libs/port/spawn.c
+++ b/libs/port/spawn.c
@@ -55,20 +55,20 @@ int _spawnvp(int mode, const char *cmdname, const char *const argv[])
         if (mode == _P_DETACH)
         {
             pid = fork();
-            if (pid == -1) _exit(1);
-            else if (pid > 0) _exit(0);
+            if (pid == -1) abort();
+            else if (pid > 0) return pid;
             /* else in grandchild */
         }
 
         signal( SIGPIPE, SIG_DFL );
         execvp(cmdname, (char **)argv);
-        _exit(1);
+        abort();
     }
 
     if (pid == -1)
         return -1;
 
-    if (mode == _P_OVERLAY) exit(0);
+    if (mode == _P_OVERLAY) abort();
 
     if (mode == _P_WAIT || mode == _P_DETACH)
     {
-- 
2.9.3




More information about the wine-patches mailing list