diff options
| author | riastradh <riastradh@NetBSD.org> | 2015-04-11 12:54:41 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2015-04-11 12:54:41 +0000 |
| commit | 190deff23b05efe7bfefb34744b24ea0ab592a4f (patch) | |
| tree | 20f145a832727e586658f101f11266bba72eefeb /lib | |
| parent | f03158bd2a187f8b72e029991ade1d305d898310 (diff) | |
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 (limited to 'lib')
| -rw-r--r-- | lib/librumphijack/hijack.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/librumphijack/hijack.c b/lib/librumphijack/hijack.c index ce1d47f9986..f63b1ea552c 100644 --- a/lib/librumphijack/hijack.c +++ b/lib/librumphijack/hijack.c @@ -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 @@ fork(void) } #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 |
