diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-12-16 08:34:11 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-12-16 08:34:11 +0000 |
| commit | e5314f197ebf0fdab8d96096a6286b893b7f59f3 (patch) | |
| tree | c3d16eedc0aeda2a8f5760e1063587b5ab6bf595 /usr.bin | |
| parent | 89680e28139c75fea80b362ae6a764f491b5d83d (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/make/main.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 79a376d2ade6..a03e9c59b22a 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -448,6 +448,10 @@ chdir_verify_path(path, obpath) return 0; } +void +catch_child(int sig) +{ +} /*- * main -- @@ -490,6 +494,22 @@ main(argc, argv) /* avoid faults on read-only strings */ static char syspath[] = _PATH_DEFSYSPATH; + { + /* + * Catch SIGCHLD so that we get kicked out of select() when we + * need to look at a child. This is only known to matter for the + * -j case (perhaps without -P). + * + * XXX this is intentionally misplaced. + */ + struct sigaction sa; + + sigemptyset(&sa.sa_mask); + sa.sa_flags = SA_RESTART | SA_NOCLDSTOP; + sa.sa_handler = catch_child; + sigaction(SIGCHLD, &sa, NULL); + } + #ifdef RLIMIT_NOFILE /* * get rid of resource limit on file descriptors |
