[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] libevent 2.1.11-stable breaks the links browser
Hi
The patch 497ef904d544ac51de43934549dbeccce8e6e8f8 ("Warn if forked from
the event loop during event_reinit()") breaks the links browser when it is
compiled with libevent.
How to reproduce:
1. on the first terminal, run links
2. on the second terminal, run links
3. switch back to the first terminal and quit links
You'll get this error and both instances will quit:
[warn] event_reinit: forked from the event_loop.
ERROR: event_reinit failed: No such file or directory
What's happening - Links on the first terminal is master and it listens on
unix domain socket ~/.links/socket. Links on the second terminal connects
to this socket and passes keystrokes and receives screen updates. When you
quit links on the first terminal, it does "if (fork() > 0) _exit(0); ...
event_reinit()" (see the functions os_detach_console() and reinit_child()
in the source code), so that it keeps running in the background and serves
requests for links on the second terminal.
Links is event based and almost all the code runs from event_loop. Will
you fix libevent to allow fork() from event handlers? Or do you insist
that we can't call fork from an event handler and that some workaround in
links has to be implemented?
Mikulas
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.