Software /
code /
prosody
Changeset
7441:df1be36f87b1
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 25 May 2016 21:35:09 +0200 |
parents | 7438:6bf4c227c8f3 (current diff) 7440:5424e24cdcb1 (diff) |
children | 7444:45d28235ebe0 |
files | |
diffstat | 2 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util-src/crand.c Sun May 22 20:07:20 2016 +0100 +++ b/util-src/crand.c Wed May 25 21:35:09 2016 +0200 @@ -106,7 +106,7 @@ #endif - lua_pushlstring(L, buf, ret); + lua_pushlstring(L, (const char *)buf, ret); #ifndef BUFLEN free(buf); #endif
--- a/util-src/pposix.c Sun May 22 20:07:20 2016 +0100 +++ b/util-src/pposix.c Wed May 25 21:35:09 2016 +0200 @@ -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) {