From dafbef3ade130317ad0d941f9ce312bb68a708df Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Sat, 14 May 2022 14:23:27 -0400 Subject: Unlock the screen on SIGUSR1 When the screen is locked using ext_session_lock, killing swaylock will leave the session locked. This is normally desirable if the kill is due to the OOM killer or swaylock crashing, but can be undesirable if an unlock is desired. This adds a signal handler for SIGUSR1 if using ext_session_lock. --- loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'loop.c') diff --git a/loop.c b/loop.c index 674b310..8cbfaa6 100644 --- a/loop.c +++ b/loop.c @@ -82,7 +82,7 @@ void loop_poll(struct loop *loop) { } int ret = poll(loop->fds, loop->fd_length, ms); - if (ret < 0) { + if (ret < 0 && errno != EINTR) { swaylock_log_errno(LOG_ERROR, "poll failed"); exit(1); } -- cgit v1.2.3