X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/f48fe476353fdc21c0d6b67b4377866ee1fa4a38..7f2b31d90ceabd3ecaa456bef0eb015f5cca0311:/usr/src/usr.bin/find/find.c diff --git a/usr/src/usr.bin/find/find.c b/usr/src/usr.bin/find/find.c index 8e035f0f95..20b1476e2a 100644 --- a/usr/src/usr.bin/find/find.c +++ b/usr/src/usr.bin/find/find.c @@ -1,4 +1,4 @@ -static char *sccsid = "@(#)find.c 4.2 (Berkeley) %G%"; +static char *sccsid = "@(#)find.c 4.3 (Berkeley) %G%"; /* find COMPILE: cc -o find -s -O -i find.c -lS */ #include #include @@ -456,8 +456,14 @@ doex(com) } nargv[np] = 0; if (np==0) return(9); - if(fork()) /*parent*/ wait(&ccode); - else { /*child*/ + if(fork()) /*parent*/ { +#include + int (*old)() = signal(SIGINT, SIG_IGN); + int (*oldq)() = signal(SIGQUIT, SIG_IGN); + wait(&ccode); + signal(SIGINT, old); + signal(SIGQUIT, oldq); + } else { /*child*/ chdir(Home); execvp(nargv[0], nargv, np); exit(1);