diff options
author | Kim Alvefur <zash@zash.se> | 2016-05-25 21:35:09 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-05-25 21:35:09 +0200 |
commit | a94034cbe38778a9e9bdf6bc10faf8a1584f4156 (patch) | |
tree | 3556e1c72692e7f3e51123d92fbdc1d6ed34e820 /util-src/pposix.c | |
parent | 02a58e54db100bda071a7043bbcfc0022d3a10af (diff) | |
parent | 01a15bfbe296ed254b1daae646f07640e389d70d (diff) | |
download | prosody-a94034cbe38778a9e9bdf6bc10faf8a1584f4156.tar.gz prosody-a94034cbe38778a9e9bdf6bc10faf8a1584f4156.zip |
Merge 0.10->trunk
Diffstat (limited to 'util-src/pposix.c')
-rw-r--r-- | util-src/pposix.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/util-src/pposix.c b/util-src/pposix.c index 1b69852d..b48465d3 100644 --- a/util-src/pposix.c +++ b/util-src/pposix.c @@ -49,6 +49,19 @@ #define WITH_MALLINFO #endif +#if defined(RFPROC) && defined(EV_SET) +/* + * On *BSD, calling fork() is equivalent to rfork(RFPROC | RFFDG). + * + * RFFDG being set means that the file descriptor table is copied, + * otherwise it's shared. We want the later, otherwise libevent gets + * messed up. + * + * See issue #412 + */ +#define fork() rfork(RFPROC) +#endif + /* Daemonization support */ static int lc_daemonize(lua_State* L) { |