Module Name:    src
Committed By:   pooka
Date:           Wed Aug 11 10:25:59 UTC 2010

Modified Files:
        src/lib/librumpuser: rumpuser.c

Log Message:
* if kevent() fails with EINTR, try again instead of returning an error
* stuff rumpuser_dprintf to stderr instead of stdout


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/librumpuser/rumpuser.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/librumpuser/rumpuser.c
diff -u src/lib/librumpuser/rumpuser.c:1.8 src/lib/librumpuser/rumpuser.c:1.9
--- src/lib/librumpuser/rumpuser.c:1.8	Wed Jun  9 14:08:17 2010
+++ src/lib/librumpuser/rumpuser.c	Wed Aug 11 10:25:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser.c,v 1.8 2010/06/09 14:08:17 pooka Exp $	*/
+/*	$NetBSD: rumpuser.c,v 1.9 2010/08/11 10:25:59 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.8 2010/06/09 14:08:17 pooka Exp $");
+__RCSID("$NetBSD: rumpuser.c,v 1.9 2010/08/11 10:25:59 pooka Exp $");
 #endif /* !lint */
 
 /* thank the maker for this */
@@ -556,8 +556,11 @@
 	struct kevent kev;
 	int rv;
 
+ again:
 	KLOCK_WRAP(rv = kevent(kq, NULL, 0, &kev, 1, NULL));
 	if (rv == -1) {
+		if (errno == EINTR)
+			goto again;
 		*error = errno;
 		return -1;
 	}
@@ -577,7 +580,7 @@
 	int rv;
 
 	va_start(ap, format);
-	rv = vprintf(format, ap);
+	rv = vfprintf(stderr, format, ap);
 	va_end(ap);
 
 	return rv;

Reply via email to