summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-07-17 17:29:35 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-07-17 17:29:35 +0200
commit171ebcfe02f87212fd8d2080bcc6217e5962955b (patch)
treef8856cb5647be467c934b648de54a6c1122af342
parent9de97b3aa26182a6f5d21a52c8e6f5952ae937c1 (diff)
signals.c: Globally initialize sig_exit; return immediately after SIGTERM etc
-rw-r--r--src/signals.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/signals.c b/src/signals.c
index 262423b..aeaf889 100644
--- a/src/signals.c
+++ b/src/signals.c
@@ -28,13 +28,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "options.h"
void feh_handle_signal(int);
-int sig_exit;
+int sig_exit = 0;
void setup_signal_handlers()
{
struct sigaction feh_sh;
sigset_t feh_ss;
- sig_exit = 0;
if (
(sigemptyset(&feh_ss) == -1) ||
(sigaddset(&feh_ss, SIGUSR1) == -1) ||
@@ -89,6 +88,7 @@ void feh_handle_signal(int signo)
if (childpid)
killpg(childpid, SIGINT);
sig_exit = 128 + signo;
+ return;
}
winwid = winwidget_get_first_window_of_type(WIN_TYPE_SLIDESHOW);