From 52982a7d87fb664d8bbc9f8549fc6c89fd633a2b Mon Sep 17 00:00:00 2001 From: guenther <> Date: Thu, 21 Jun 2012 00:56:59 +0000 Subject: [PATCH] __tfork() needs to set the stack address of the new thread in the kernel, so that it can't get a signal while still running on the parent thread's stack. Also, pass in sizeof(struct __tfork) to provide forward compat when more members are added. This is an ABI change, so switch syscall numbers and bump lib majors this time. ok deraadt@ matthew@ --- src/include/unistd.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/include/unistd.h b/src/include/unistd.h index 61b10f06..c4a2fa92 100644 --- a/src/include/unistd.h +++ b/src/include/unistd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: unistd.h,v 1.72 2012/05/30 19:34:30 matthew Exp $ */ +/* $OpenBSD: unistd.h,v 1.73 2012/06/21 00:56:59 guenther Exp $ */ /* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */ /*- @@ -501,6 +501,8 @@ void setusershell(void); int strtofflags(char **, u_int32_t *, u_int32_t *); int swapctl(int cmd, const void *arg, int misc); int syscall(int, ...); +pid_t __tfork_thread(const struct __tfork *, size_t, void (*)(void *), + void *); #endif /* __BSD_VISIBLE */ __END_DECLS