summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-11-16 23:54:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-11-16 23:54:39 +0000
commit9b1f18885f9442d0fe689c4b9be32a16ce026765 (patch)
treef3897f373d0fabc3be680e17d6b99a3c50c57408 /usr.bin
parent8fc355508a212636378bb6b6f4fec15bbbc16e6d (diff)
errno safety in signal handler
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/find/misc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/find/misc.c b/usr.bin/find/misc.c
index 6e71820b57c..8d5e8542f21 100644
--- a/usr.bin/find/misc.c
+++ b/usr.bin/find/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.4 1997/06/30 23:54:08 millert Exp $ */
+/* $OpenBSD: misc.c,v 1.5 2001/11/16 23:54:38 deraadt 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.4 1997/06/30 23:54:08 millert Exp $";
+static char rcsid[] = "$OpenBSD: misc.c,v 1.5 2001/11/16 23:54:38 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -139,9 +139,11 @@ void
show_path(sig)
int sig;
{
+ int save_errno = errno;
extern FTSENT *entry;
write(STDERR_FILENO, "find path: ", 11);
write(STDERR_FILENO, entry->fts_path, entry->fts_pathlen);
write(STDERR_FILENO, "\n", 1);
+ errno = save_errno;
}