mirror of
https://github.com/tmux/tmux.git
synced 2025-04-22 12:28:48 +00:00
Remove EVENT_* variables from environment after initializing libevent so they
are not carried into child processes; from Henry Qin.
This commit is contained in:
parent
c8a706117f
commit
50e3e3e72f
@ -88,11 +88,17 @@ osdep_get_cwd(int fd)
|
|||||||
struct event_base *
|
struct event_base *
|
||||||
osdep_event_init(void)
|
osdep_event_init(void)
|
||||||
{
|
{
|
||||||
|
struct event_base *base;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On OS X, kqueue and poll are both completely broken and don't
|
* On OS X, kqueue and poll are both completely broken and don't
|
||||||
* work on anything except socket file descriptors (yes, really).
|
* work on anything except socket file descriptors (yes, really).
|
||||||
*/
|
*/
|
||||||
setenv("EVENT_NOKQUEUE", "1", 1);
|
setenv("EVENT_NOKQUEUE", "1", 1);
|
||||||
setenv("EVENT_NOPOLL", "1", 1);
|
setenv("EVENT_NOPOLL", "1", 1);
|
||||||
return (event_init());
|
|
||||||
|
base = event_init();
|
||||||
|
unsetenv("EVENT_NOKQUEUE");
|
||||||
|
unsetenv("EVENT_NOPOLL");
|
||||||
|
return (base);
|
||||||
}
|
}
|
||||||
|
@ -193,10 +193,15 @@ osdep_get_cwd(int fd)
|
|||||||
struct event_base *
|
struct event_base *
|
||||||
osdep_event_init(void)
|
osdep_event_init(void)
|
||||||
{
|
{
|
||||||
|
struct event_base *base;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On some versions of FreeBSD, kqueue doesn't work properly on tty
|
* On some versions of FreeBSD, kqueue doesn't work properly on tty
|
||||||
* file descriptors. This is fixed in recent FreeBSD versions.
|
* file descriptors. This is fixed in recent FreeBSD versions.
|
||||||
*/
|
*/
|
||||||
setenv("EVENT_NOKQUEUE", "1", 1);
|
setenv("EVENT_NOKQUEUE", "1", 1);
|
||||||
return (event_init());
|
|
||||||
|
base = event_init();
|
||||||
|
unsetenv("EVENT_NOKQUEUE");
|
||||||
|
return (base);
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,12 @@ osdep_get_cwd(int fd)
|
|||||||
struct event_base *
|
struct event_base *
|
||||||
osdep_event_init(void)
|
osdep_event_init(void)
|
||||||
{
|
{
|
||||||
|
struct event_base *base;
|
||||||
|
|
||||||
/* On Linux, epoll doesn't work on /dev/null (yes, really). */
|
/* On Linux, epoll doesn't work on /dev/null (yes, really). */
|
||||||
setenv("EVENT_NOEPOLL", "1", 1);
|
setenv("EVENT_NOEPOLL", "1", 1);
|
||||||
return (event_init());
|
|
||||||
|
base = event_init();
|
||||||
|
unsetenv("EVENT_NOEPOLL");
|
||||||
|
return (base);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user