Module Name:    src
Committed By:   riastradh
Date:           Sat Apr 11 12:54:41 UTC 2015

Modified Files:
        src/lib/librumphijack: hijack.c

Log Message:
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@


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 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.116 src/lib/librumphijack/hijack.c:1.117
--- src/lib/librumphijack/hijack.c:1.116	Thu Mar  5 00:26:17 2015
+++ src/lib/librumphijack/hijack.c	Sat Apr 11 12:54:41 2015
@@ -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

Reply via email to