Loading src/imlib.c +2 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ int xinerama_screen; int num_xinerama_screens; #endif /* HAVE_LIBXINERAMA */ int childpid; int childpid = 0; static char *feh_http_load_image(char *url); static char *feh_magick_load_image(char *filename); Loading Loading @@ -327,6 +327,7 @@ static char *feh_magick_load_image(char *filename) */ waitpid(-1, &status, 0); } childpid = 0; } return sfn; Loading src/signals.c +20 −6 Original line number Diff line number Diff line Loading @@ -37,7 +37,10 @@ void setup_signal_handlers() (sigemptyset(&feh_ss) == -1) || (sigaddset(&feh_ss, SIGUSR1) == -1) || (sigaddset(&feh_ss, SIGUSR2) == -1) || (sigaddset(&feh_ss, SIGALRM) == -1)) (sigaddset(&feh_ss, SIGALRM) == -1) || (sigaddset(&feh_ss, SIGTERM) == -1) || (sigaddset(&feh_ss, SIGQUIT) == -1) || (sigaddset(&feh_ss, SIGINT) == -1)) { weprintf("Failed to set up signal masks"); return; Loading @@ -50,7 +53,10 @@ void setup_signal_handlers() if ( (sigaction(SIGUSR1, &feh_sh, NULL) == -1) || (sigaction(SIGUSR2, &feh_sh, NULL) == -1) || (sigaction(SIGALRM, &feh_sh, NULL) == -1)) (sigaction(SIGALRM, &feh_sh, NULL) == -1) || (sigaction(SIGTERM, &feh_sh, NULL) == -1) || (sigaction(SIGQUIT, &feh_sh, NULL) == -1) || (sigaction(SIGINT, &feh_sh, NULL) == -1)) { weprintf("Failed to set up signal handler"); return; Loading @@ -64,11 +70,19 @@ void feh_handle_signal(int signo) winwidget winwid; int i; if (signo == SIGALRM) { switch (signo) { case SIGALRM: if (childpid) killpg(childpid, SIGINT); kill(childpid, SIGINT); return; case SIGINT: case SIGTERM: case SIGQUIT: if (childpid) killpg(childpid, SIGINT); exit(128 + signo); } winwid = winwidget_get_first_window_of_type(WIN_TYPE_SLIDESHOW); if (winwid) { Loading Loading
src/imlib.c +2 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ int xinerama_screen; int num_xinerama_screens; #endif /* HAVE_LIBXINERAMA */ int childpid; int childpid = 0; static char *feh_http_load_image(char *url); static char *feh_magick_load_image(char *filename); Loading Loading @@ -327,6 +327,7 @@ static char *feh_magick_load_image(char *filename) */ waitpid(-1, &status, 0); } childpid = 0; } return sfn; Loading
src/signals.c +20 −6 Original line number Diff line number Diff line Loading @@ -37,7 +37,10 @@ void setup_signal_handlers() (sigemptyset(&feh_ss) == -1) || (sigaddset(&feh_ss, SIGUSR1) == -1) || (sigaddset(&feh_ss, SIGUSR2) == -1) || (sigaddset(&feh_ss, SIGALRM) == -1)) (sigaddset(&feh_ss, SIGALRM) == -1) || (sigaddset(&feh_ss, SIGTERM) == -1) || (sigaddset(&feh_ss, SIGQUIT) == -1) || (sigaddset(&feh_ss, SIGINT) == -1)) { weprintf("Failed to set up signal masks"); return; Loading @@ -50,7 +53,10 @@ void setup_signal_handlers() if ( (sigaction(SIGUSR1, &feh_sh, NULL) == -1) || (sigaction(SIGUSR2, &feh_sh, NULL) == -1) || (sigaction(SIGALRM, &feh_sh, NULL) == -1)) (sigaction(SIGALRM, &feh_sh, NULL) == -1) || (sigaction(SIGTERM, &feh_sh, NULL) == -1) || (sigaction(SIGQUIT, &feh_sh, NULL) == -1) || (sigaction(SIGINT, &feh_sh, NULL) == -1)) { weprintf("Failed to set up signal handler"); return; Loading @@ -64,11 +70,19 @@ void feh_handle_signal(int signo) winwidget winwid; int i; if (signo == SIGALRM) { switch (signo) { case SIGALRM: if (childpid) killpg(childpid, SIGINT); kill(childpid, SIGINT); return; case SIGINT: case SIGTERM: case SIGQUIT: if (childpid) killpg(childpid, SIGINT); exit(128 + signo); } winwid = winwidget_get_first_window_of_type(WIN_TYPE_SLIDESHOW); if (winwid) { Loading