Module Name: src
Committed By: martin
Date: Tue Dec 9 20:13:38 UTC 2014
Modified Files:
src/lib/librumphijack [netbsd-7]: hijack.c
Log Message:
Pull up following revision(s) (requested by gson in ticket #303):
lib/librumphijack/hijack.c: revision 1.110
In case of no dup2'd fd's, make sure that F_CLOSEM for the
rump kernel starts from 0.
Fixes rumphijack fdoff test (notably, this bug had nothing to do with
fdoff, and was exposed >3 years after writing the test when rump kernels
started providing fd's 0/1/2)
To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.109.2.1 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.109 src/lib/librumphijack/hijack.c:1.109.2.1
--- src/lib/librumphijack/hijack.c:1.109 Mon Jul 21 14:23:43 2014
+++ src/lib/librumphijack/hijack.c Tue Dec 9 20:13:38 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: hijack.c,v 1.109 2014/07/21 14:23:43 gson Exp $ */
+/* $NetBSD: hijack.c,v 1.109.2.1 2014/12/09 20:13:38 martin Exp $ */
/*-
* Copyright (c) 2011 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
#include <rump/rumpuser_port.h>
#if !defined(lint)
-__RCSID("$NetBSD: hijack.c,v 1.109 2014/07/21 14:23:43 gson Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.109.2.1 2014/12/09 20:13:38 martin Exp $");
#endif
#include <sys/param.h>
@@ -1380,7 +1380,7 @@ fcntl(int fd, int cmd, ...)
* for the file descriptors not dup2'd.
*/
- for (i = 0, maxdup2 = 0; i <= DUP2HIGH; i++) {
+ for (i = 0, maxdup2 = -1; i <= DUP2HIGH; i++) {
if (dup2vec[i] & DUP2BIT) {
int val;