diff --git a/include/unistd.h b/include/unistd.h --- a/include/unistd.h +++ b/include/unistd.h @@ -326,6 +326,9 @@ __BEGIN_DECLS /* 1003.1-1990 */ void _exit(int) __dead2; +#if __POSIX_VISIBLE >= 202405 +pid_t _Fork(void); +#endif int access(const char *, int); unsigned int alarm(unsigned int); int chdir(const char *); @@ -595,7 +598,6 @@ int unwhiteout(const char *); void *valloc(size_t); /* obsoleted by malloc() */ int funlinkat(int, const char *, int, int); -pid_t _Fork(void); #ifndef _OPTRESET_DECLARED #define _OPTRESET_DECLARED diff --git a/lib/libsys/fork.2 b/lib/libsys/fork.2 --- a/lib/libsys/fork.2 +++ b/lib/libsys/fork.2 @@ -138,6 +138,7 @@ or .Xr rtld 1 ) are available in the child if forked from multi-threaded parent. +.Pp In particular, if using dynamic linking, all dynamic symbols used by the child after .Fn _Fork @@ -151,6 +152,7 @@ or by using each symbol before the .Fn _Fork call to force the binding. +Either of the methods subtly changes the ABI of the resulting binary. .Sh RETURN VALUES Upon successful completion, .Fn fork