install -s failed on System V if SIGCHLD was ignored.
authorJim Meyering <jim@meyering.net>
Wed, 21 Apr 2004 12:25:18 +0000 (12:25 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 21 Apr 2004 12:25:18 +0000 (12:25 +0000)
Include <signal.h>.
(main) [defined SIGCHLD]: Set SIGCHLD handler to the default,
if -s is given, since System V fork+wait does not work if SIGCHLD
is ignored.

src/install.c

index 3279782..6f447b2 100644 (file)
@@ -21,6 +21,7 @@
 #include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
+#include <signal.h>
 #include <pwd.h>
 #include <grp.h>
 
@@ -227,6 +228,10 @@ main (int argc, char **argv)
          break;
        case 's':
          strip_files = 1;
+#ifdef SIGCHLD
+         /* System V fork+wait does not work if SIGCHLD is ignored.  */
+         signal (SIGCHLD, SIG_DFL);
+#endif
          break;
        case 'd':
          dir_arg = 1;