Module Name: src
Committed By: pooka
Date: Sun Feb 6 13:05:20 UTC 2011
Modified Files:
src/lib/librumphijack: hijack.c
Log Message:
be kinder about kqueue()
(but paradoxically omit the surprise)
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/lib/librumphijack/hijack.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.26 src/lib/librumphijack/hijack.c:1.27
--- src/lib/librumphijack/hijack.c:1.26 Sat Feb 5 16:59:24 2011
+++ src/lib/librumphijack/hijack.c Sun Feb 6 13:05:19 2011
@@ -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*/
}