Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/usr.sbin/perfused Pull up following revision(s) (requeste...
details: https://anonhg.NetBSD.org/src/rev/69f6e107ca4b
branches: netbsd-7
changeset: 798726:69f6e107ca4b
user: snj <snj%NetBSD.org@localhost>
date: Sun Dec 21 19:27:11 2014 +0000
description:
Pull up following revision(s) (requested by manu in ticket #335):
usr.sbin/perfused/perfused.c: revision 1.25
Survive if filesystem installs a signal handler
We tested for signal(3) to return 0 for success, which is incorrect:
signal(3) returns the previous handler. Success should be tested as
!= SIG_ERR, otherwise we fail when a signal handler was previously
installed by perfused(8) parrent process, which happens to be the
FUSE filesystem.
diffstat:
usr.sbin/perfused/perfused.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r c1a2738d166c -r 69f6e107ca4b usr.sbin/perfused/perfused.c
--- a/usr.sbin/perfused/perfused.c Sun Dec 21 19:24:22 2014 +0000
+++ b/usr.sbin/perfused/perfused.c Sun Dec 21 19:27:11 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perfused.c,v 1.24 2012/07/21 05:49:42 manu Exp $ */
+/* $NetBSD: perfused.c,v 1.24.10.1 2014/12/21 19:27:11 snj Exp $ */
/*-
* Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -298,7 +298,7 @@
"could not open \"%s\"",
_PATH_VAR_RUN_PERFUSE_TRACE);
- if (signal(SIGUSR1, sigusr1_handler) != 0)
+ if (signal(SIGUSR1, sigusr1_handler) == SIG_ERR)
DERR(EX_OSERR, "signal failed");
/*
@@ -399,7 +399,7 @@
perfuse_diagflags |= parse_debug(optarg);
break;
case 's':
- if (signal(SIGINFO, siginfo_handler) != 0)
+ if (signal(SIGINFO, siginfo_handler) == SIG_ERR)
DERR(EX_OSERR, "signal failed");
break;
case 'f':
Home |
Main Index |
Thread Index |
Old Index