summaryrefslogtreecommitdiff
path: root/usr.bin/find/misc.c
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-10-24 03:46:06 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-10-24 03:46:06 +0000
commit6344795100ad92aae94694aeace1e65374d288c1 (patch)
tree4c1a5d3f5195d202d8f212afa71f288ce43ad74f /usr.bin/find/misc.c
parentbf3c020c3dffc6b56743d8a908fab5929d89c782 (diff)
Respond to SIGINFO; from PR #42
Diffstat (limited to 'usr.bin/find/misc.c')
-rw-r--r--usr.bin/find/misc.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/usr.bin/find/misc.c b/usr.bin/find/misc.c
index edfbff64fc5..d43be538341 100644
--- a/usr.bin/find/misc.c
+++ b/usr.bin/find/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.2 1996/06/26 05:33:12 deraadt Exp $ */
+/* $OpenBSD: misc.c,v 1.3 1996/10/24 03:46:05 tholo Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -38,7 +38,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)misc.c 8.1 (Berkeley) 6/6/93";*/
-static char rcsid[] = "$OpenBSD: misc.c,v 1.2 1996/06/26 05:33:12 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: misc.c,v 1.3 1996/10/24 03:46:05 tholo Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -50,6 +50,7 @@ static char rcsid[] = "$OpenBSD: misc.c,v 1.2 1996/06/26 05:33:12 deraadt Exp $"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include "find.h"
@@ -128,3 +129,19 @@ emalloc(len)
return (p);
err(1, NULL);
}
+
+/*
+ * show_path --
+ * called on SIGINFO
+ */
+/* ARGSUSED */
+void
+show_path(sig)
+ int sig;
+{
+ extern FTSENT *entry;
+
+ write(STDERR_FILENO, "find path: ", 11);
+ write(STDERR_FILENO, entry->fts_path, entry->fts_pathlen);
+ write(STDERR_FILENO, "\n", 1);
+}