Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumphijack Define the expansion of the VFORK macro, n...
details: https://anonhg.NetBSD.org/src/rev/63642cfd2677
branches: trunk
changeset: 337323:63642cfd2677
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Apr 11 12:54:41 2015 +0000
description:
Define the expansion of the VFORK macro, not the symbol `VFORK'.
Fixes hijacking processes that vfork and exec. Symptom was the child
would spin with read/EAGAIN <-> kevent/EBADF because the inheritance
mechanism relied on setting the holyfd to -1 on fork...which didn't
happen if we didn't hijack vfork.
ok pooka@
diffstat:
lib/librumphijack/hijack.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 2eaa48bcd21b -r 63642cfd2677 lib/librumphijack/hijack.c
--- a/lib/librumphijack/hijack.c Sat Apr 11 10:10:14 2015 +0000
+++ b/lib/librumphijack/hijack.c Sat Apr 11 12:54:41 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hijack.c,v 1.116 2015/03/05 00:26:17 pooka Exp $ */
+/* $NetBSD: hijack.c,v 1.117 2015/04/11 12:54:41 riastradh Exp $ */
/*-
* Copyright (c) 2011 Antti Kantee. All Rights Reserved.
@@ -34,7 +34,7 @@
#include <rump/rumpuser_port.h>
#if !defined(lint)
-__RCSID("$NetBSD: hijack.c,v 1.116 2015/03/05 00:26:17 pooka Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.117 2015/04/11 12:54:41 riastradh Exp $");
#endif
#include <sys/param.h>
@@ -1721,7 +1721,8 @@
}
#ifdef VFORK
/* we do not have the luxury of not requiring a stackframe */
-__strong_alias(VFORK,fork);
+#define __strong_alias_macro(m, f) __strong_alias(m, f)
+__strong_alias_macro(VFORK,fork);
#endif
int
Home |
Main Index |
Thread Index |
Old Index