Handle SIGINT through libev
Handle SIGINT using libev's ev_signal handler, instead of using sigaction(). Fixes #64. But compton might miss signals when it's not in the main loop (e.g. when compton is reset), and thus not exit "clearly". It should cause any real problem though, so we don't care. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@ -311,6 +311,8 @@ typedef struct session {
|
||||
ev_prepare event_check;
|
||||
/// Signal handler for SIGUSR1
|
||||
ev_signal usr1_signal;
|
||||
/// Signal handler for SIGINT
|
||||
ev_signal int_signal;
|
||||
/// backend data
|
||||
void *backend_data;
|
||||
/// libev mainloop
|
||||
|
Reference in New Issue
Block a user