Ken Thomases : libport: No need to reset SIGCHLD because we' re not changing it anymore.

Alexandre Julliard julliard at winehq.org
Thu Dec 1 14:05:32 CST 2011


Module: wine
Branch: master
Commit: 87805716987f6d4ecb794b4cce3363e81d0a7056
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=87805716987f6d4ecb794b4cce3363e81d0a7056

Author: Ken Thomases <ken at codeweavers.com>
Date:   Wed Nov 30 16:48:33 2011 -0600

libport: No need to reset SIGCHLD because we're not changing it anymore.

---

 libs/port/spawn.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/libs/port/spawn.c b/libs/port/spawn.c
index 38c2944..40efebb 100644
--- a/libs/port/spawn.c
+++ b/libs/port/spawn.c
@@ -37,7 +37,6 @@ int spawnvp(int mode, const char *cmdname, const char *const argv[])
 {
 #ifndef HAVE__SPAWNVP
     int pid = 0, status, wret;
-    struct sigaction dfl_act, old_act;
 
     if (mode == _P_OVERLAY)
     {
@@ -49,16 +48,10 @@ int spawnvp(int mode, const char *cmdname, const char *const argv[])
             return -1;
     }
 
-    dfl_act.sa_handler = SIG_DFL;
-    dfl_act.sa_flags = 0;
-    sigemptyset( &dfl_act.sa_mask );
-
-    if (mode == _P_WAIT) sigaction( SIGCHLD, &dfl_act, &old_act );
-
     pid = fork();
     if (pid == 0)
     {
-        sigaction( SIGPIPE, &dfl_act, NULL );
+        signal( SIGPIPE, SIG_DFL );
         execvp(cmdname, (char **)argv);
         _exit(1);
     }
@@ -74,7 +67,6 @@ int spawnvp(int mode, const char *cmdname, const char *const argv[])
         else pid = 255; /* abnormal exit with an abort or an interrupt */
     }
 
-    if (mode == _P_WAIT) sigaction( SIGCHLD, &old_act, NULL );
     return pid;
 #else   /* HAVE__SPAWNVP */
     return _spawnvp(mode, cmdname, argv);




More information about the wine-cvs mailing list