diff options
author | Jim Meyering <jim@meyering.net> | 2004-04-21 12:25:18 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-04-21 12:25:18 +0000 |
commit | 4441496397d003bdae8bfe21c4546d3ea02dcee2 (patch) | |
tree | 78ae6f565629569534d1592ffa1d4b084af1fcce /src/install.c | |
parent | 1119774873a62f3be375683dcc34f84a5bbba6ac (diff) | |
download | coreutils-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/install.c')
-rw-r--r-- | src/install.c | 5 |
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; |