diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-10-06 12:23:37 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-10-06 12:23:37 +0000 |
commit | fff618aeb4142773ff388ac9b52d127a510c6690 (patch) | |
tree | 72043a849d02ac89ee7dac20f8ae04830ea8832d /source3/smbwrapper/realcalls.h | |
parent | 4fe9c5b65614d048c053989ab3d1e97b1bbcfa2b (diff) | |
download | samba-fff618aeb4142773ff388ac9b52d127a510c6690.tar.gz samba-fff618aeb4142773ff388ac9b52d127a510c6690.tar.xz samba-fff618aeb4142773ff388ac9b52d127a510c6690.zip |
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)
Diffstat (limited to 'source3/smbwrapper/realcalls.h')
-rw-r--r-- | source3/smbwrapper/realcalls.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbwrapper/realcalls.h b/source3/smbwrapper/realcalls.h index 338e1950874..65431bf53f7 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 |