diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-10-24 03:46:06 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-10-24 03:46:06 +0000 |
commit | 6344795100ad92aae94694aeace1e65374d288c1 (patch) | |
tree | 4c1a5d3f5195d202d8f212afa71f288ce43ad74f /usr.bin/find/main.c | |
parent | bf3c020c3dffc6b56743d8a908fab5929d89c782 (diff) |
Respond to SIGINFO; from PR #42
Diffstat (limited to 'usr.bin/find/main.c')
-rw-r--r-- | usr.bin/find/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/find/main.c b/usr.bin/find/main.c index 19fa3afe157..c193f1ee9e2 100644 --- a/usr.bin/find/main.c +++ b/usr.bin/find/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.2 1996/06/26 05:33:11 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.3 1996/10/24 03:46:04 tholo Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -35,7 +35,7 @@ #ifndef lint /*static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";*/ -static char rcsid[] = "$OpenBSD: main.c,v 1.2 1996/06/26 05:33:11 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.3 1996/10/24 03:46:04 tholo Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -45,6 +45,7 @@ static char rcsid[] = "$OpenBSD: main.c,v 1.2 1996/06/26 05:33:11 deraadt Exp $" #include <errno.h> #include <fcntl.h> #include <fts.h> +#include <signal.h> #include <stdio.h> #include <stdlib.h> #include <time.h> @@ -66,11 +67,14 @@ main(argc, argv) int argc; char *argv[]; { + struct sigaction sa = { show_path, SA_RESTART, NULL }; register char **p, **start; int ch; (void)time(&now); /* initialize the time-of-day */ + sigaction(SIGINFO, &sa, NULL); + p = start = argv; ftsoptions = FTS_NOSTAT|FTS_PHYSICAL; while ((ch = getopt(argc, argv, "Hdf:hXx")) != EOF) |