summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-04-21 12:25:18 +0000
committerJim Meyering <jim@meyering.net>2004-04-21 12:25:18 +0000
commit4441496397d003bdae8bfe21c4546d3ea02dcee2 (patch)
tree78ae6f565629569534d1592ffa1d4b084af1fcce /src
parent1119774873a62f3be375683dcc34f84a5bbba6ac (diff)
downloadcoreutils-4441496397d003bdae8bfe21c4546d3ea02dcee2.tar.xz
install -s failed on System V if SIGCHLD was ignored.
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.
Diffstat (limited to 'src')
-rw-r--r--src/install.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/install.c b/src/install.c
index 3279782ba..6f447b214 100644
--- a/src/install.c
+++ b/src/install.c
@@ -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;