From fff618aeb4142773ff388ac9b52d127a510c6690 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 6 Oct 1998 12:23:37 +0000 Subject: added a wrapper for fork() in a fork we have to close all server connections otherwise we can end up with two processes writing to the same socket. (This used to be commit b7ecbca3aff34ff06a445e5ee39efba48261b7e8) --- source3/smbwrapper/realcalls.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/smbwrapper/realcalls.h') diff --git a/source3/smbwrapper/realcalls.h b/source3/smbwrapper/realcalls.h index 338e195087..65431bf53f 100644 --- a/source3/smbwrapper/realcalls.h +++ b/source3/smbwrapper/realcalls.h @@ -51,6 +51,14 @@ #define NO_OPEN64_ALIAS #endif +#ifdef HAVE__FORK +#define real_fork() (_fork()) +#elif HAVE___FORK +#define real_fork() (__fork()) +#elif SYS_fork +#define real_fork() (syscall(SYS_fork,())) +#endif + #ifdef HAVE__OPENDIR #define real_opendir(fn) ((DIR *)_opendir(fn)) #elif SYS_opendir -- cgit