diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2018-03-21 08:15:15 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2018-03-21 08:15:15 +0000 |
commit | 50e3e3e72f97c32cf868efb580ffed4772e61b2d (patch) | |
tree | 3bcacfd628f37d0f170042ef4eafb16dbe642f2a /osdep-linux.c | |
parent | c8a706117fc45e8586b2c9f06b527b50da2d3bdb (diff) | |
download | rtmux-50e3e3e72f97c32cf868efb580ffed4772e61b2d.tar.gz rtmux-50e3e3e72f97c32cf868efb580ffed4772e61b2d.tar.bz2 rtmux-50e3e3e72f97c32cf868efb580ffed4772e61b2d.zip |
Remove EVENT_* variables from environment after initializing libevent so they
are not carried into child processes; from Henry Qin.
Diffstat (limited to 'osdep-linux.c')
-rw-r--r-- | osdep-linux.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/osdep-linux.c b/osdep-linux.c index 42712dea..5f0d9352 100644 --- a/osdep-linux.c +++ b/osdep-linux.c @@ -92,7 +92,12 @@ osdep_get_cwd(int fd) struct event_base * osdep_event_init(void) { + struct event_base *base; + /* On Linux, epoll doesn't work on /dev/null (yes, really). */ setenv("EVENT_NOEPOLL", "1", 1); - return (event_init()); + + base = event_init(); + unsetenv("EVENT_NOEPOLL"); + return (base); } |