mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 15:28:17 +00:00
Move signal handling to libuv event loop
This removes all signal handling code from os_unix.c to os/signal.c. Now signal handling is done like this: - Watchers for signals are registered with libuv default event loop - `event_poll` continuously calls `poll_uv_loop` to produce events until it receives user input, SIGINT or a timeout - Any signals received in `poll_uv_loop` will push events to a queue that is drained and processed by `event_poll` Signals aren't handled directly in the libuv callback to avoid recursion in the event loop(which isn't supported by libuv). The same principle will apply to other events in the future: Push to a queue from a libuv callback and drain it from `event_poll`
This commit is contained in:
@@ -5,9 +5,6 @@
|
||||
|
||||
/* os_unix.c */
|
||||
void mch_write(char_u *s, int len);
|
||||
void mch_startjmp(void);
|
||||
void mch_endjmp(void);
|
||||
void mch_didjmp(void);
|
||||
void mch_suspend(void);
|
||||
void mch_init(void);
|
||||
void reset_signals(void);
|
||||
|
Reference in New Issue
Block a user