Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumphijack be kinder about kqueue()
details: https://anonhg.NetBSD.org/src/rev/6c50aaed5519
branches: trunk
changeset: 761728:6c50aaed5519
user: pooka <pooka%NetBSD.org@localhost>
date: Sun Feb 06 13:05:19 2011 +0000
description:
be kinder about kqueue()
(but paradoxically omit the surprise)
diffstat:
lib/librumphijack/hijack.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (42 lines):
diff -r 4735bb17c4f5 -r 6c50aaed5519 lib/librumphijack/hijack.c
--- a/lib/librumphijack/hijack.c Sun Feb 06 12:49:32 2011 +0000
+++ b/lib/librumphijack/hijack.c Sun Feb 06 13:05:19 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hijack.c,v 1.26 2011/02/05 16:59:24 pooka Exp $ */
+/* $NetBSD: hijack.c,v 1.27 2011/02/06 13:05:19 pooka Exp $ */
/*-
* Copyright (c) 2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: hijack.c,v 1.26 2011/02/05 16:59:24 pooka Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.27 2011/02/06 13:05:19 pooka Exp $");
#define __ssp_weak_name(fun) _hijack_ ## fun
@@ -780,9 +780,11 @@
kqueue(void)
{
- fprintf(stderr, "kqueue unsupported");
- abort();
- /*NOTREACHED*/
+ if (!ISDUP2D(STDERR_FILENO) && isatty(STDERR_FILENO)) {
+ fprintf(stderr, "rumphijack: kqueue currently unsupported\n");
+ }
+ errno = ENOSYS;
+ return -1;
}
/*ARGSUSED*/
@@ -792,7 +794,7 @@
const struct timespec *timeout)
{
- fprintf(stderr, "kqueue unsupported");
+ fprintf(stderr, "kevent impossible\n");
abort();
/*NOTREACHED*/
}
Home |
Main Index |
Thread Index |
Old Index