Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/librumpuser Actually, support rumpuser_kill() only on Ne...



details:   https://anonhg.NetBSD.org/src/rev/11f466379d97
branches:  trunk
changeset: 754130:11f466379d97
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Apr 21 11:16:41 2010 +0000

description:
Actually, support rumpuser_kill() only on NetBSD, since signal
numbers may not match on non-NetBSD hosts.

diffstat:

 lib/librumpuser/rumpuser.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 9aa1035c4ac3 -r 11f466379d97 lib/librumpuser/rumpuser.c
--- a/lib/librumpuser/rumpuser.c        Wed Apr 21 11:13:29 2010 +0000
+++ b/lib/librumpuser/rumpuser.c        Wed Apr 21 11:16:41 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpuser.c,v 1.2 2010/04/21 11:13:29 pooka Exp $       */
+/*     $NetBSD: rumpuser.c,v 1.3 2010/04/21 11:16:41 pooka Exp $       */
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser.c,v 1.2 2010/04/21 11:13:29 pooka Exp $");
+__RCSID("$NetBSD: rumpuser.c,v 1.3 2010/04/21 11:16:41 pooka Exp $");
 #endif /* !lint */
 
 /* thank the maker for this */
@@ -577,9 +577,15 @@
 rumpuser_kill(int64_t pid, int sig, int *error)
 {
 
+#ifdef __NetBSD__
        if (pid == RUMPUSER_PID_SELF) {
                DOCALL(int, raise(sig));
        } else {
                DOCALL(int, kill((pid_t)pid, sig));
        }
+#else
+       /* XXXfixme: signal numbers may not match on non-NetBSD */
+       *error = EOPNOTSUPP;
+       return -1;
+#endif
 }



Home | Main Index | Thread Index | Old Index