diff options
author | mdodd <mdodd@FreeBSD.org> | 2003-04-07 11:00:56 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 2003-04-07 11:00:56 +0000 |
commit | 7e2b8444e09a4666ef4570568088b984d18c2ad0 (patch) | |
tree | a47801209e48fd3a1334b3a004a8871921681469 /bin/cp/cp.c | |
parent | f8221d23db2ef003ca10f5a62ec719a74430963d (diff) | |
download | FreeBSD-src-7e2b8444e09a4666ef4570568088b984d18c2ad0.zip FreeBSD-src-7e2b8444e09a4666ef4570568088b984d18c2ad0.tar.gz |
Add a SIGINFO handler.
Diffstat (limited to 'bin/cp/cp.c')
-rw-r--r-- | bin/cp/cp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c index bcba8d9..9776729 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -89,6 +89,9 @@ PATH_T to = { to.p_path, emptystring, "" }; int fflag, iflag, nflag, pflag, vflag; static int Rflag, rflag; +int info; +static void siginfo (int notused __unused); + enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; static int copy(char *[], enum op, int); @@ -173,6 +176,7 @@ main(int argc, char *argv[]) fts_options &= ~FTS_PHYSICAL; fts_options |= FTS_LOGICAL | FTS_COMFOLLOW; } + (void)signal(SIGINFO, siginfo); /* Save the target base in "to". */ target = argv[--argc]; @@ -501,3 +505,10 @@ mastercmp(const FTSENT * const *a, const FTSENT * const *b) return (1); return (0); } + +static void +siginfo (int notused __unused) +{ + + info = 1; +} |