Loading src/main.c +4 −4 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ int main(int argc, char **argv) /* main event loop */ while (feh_main_iteration(1)); return(0); return(sig_exit); } /* Return 0 to stop iterating, 1 if ok to continue. */ Loading @@ -104,7 +104,7 @@ int feh_main_iteration(int block) double t1 = 0.0, t2 = 0.0; fehtimer ft; if (window_num == 0) if (window_num == 0 || sig_exit != 0) return(0); if (first) { Loading Loading @@ -137,7 +137,7 @@ int feh_main_iteration(int block) if (ev_handler[ev.type]) (*(ev_handler[ev.type])) (&ev); if (window_num == 0) if (window_num == 0 || sig_exit != 0) return(0); } XFlush(disp); Loading Loading @@ -208,7 +208,7 @@ int feh_main_iteration(int block) feh_event_handle_stdin(); } } if (window_num == 0) if (window_num == 0 || sig_exit != 0) return(0); return(1); Loading src/signals.c +3 −1 Original line number Diff line number Diff line Loading @@ -28,11 +28,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "options.h" void feh_handle_signal(int); int sig_exit; 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) || Loading Loading @@ -86,7 +88,7 @@ void feh_handle_signal(int signo) case SIGQUIT: if (childpid) killpg(childpid, SIGINT); exit(128 + signo); sig_exit = 128 + signo; } winwid = winwidget_get_first_window_of_type(WIN_TYPE_SLIDESHOW); Loading src/signals.h +1 −1 Original line number Diff line number Diff line Loading @@ -27,5 +27,5 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define SIGNALS_H void setup_signal_handlers(); extern int sig_exit; #endif Loading
src/main.c +4 −4 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ int main(int argc, char **argv) /* main event loop */ while (feh_main_iteration(1)); return(0); return(sig_exit); } /* Return 0 to stop iterating, 1 if ok to continue. */ Loading @@ -104,7 +104,7 @@ int feh_main_iteration(int block) double t1 = 0.0, t2 = 0.0; fehtimer ft; if (window_num == 0) if (window_num == 0 || sig_exit != 0) return(0); if (first) { Loading Loading @@ -137,7 +137,7 @@ int feh_main_iteration(int block) if (ev_handler[ev.type]) (*(ev_handler[ev.type])) (&ev); if (window_num == 0) if (window_num == 0 || sig_exit != 0) return(0); } XFlush(disp); Loading Loading @@ -208,7 +208,7 @@ int feh_main_iteration(int block) feh_event_handle_stdin(); } } if (window_num == 0) if (window_num == 0 || sig_exit != 0) return(0); return(1); Loading
src/signals.c +3 −1 Original line number Diff line number Diff line Loading @@ -28,11 +28,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "options.h" void feh_handle_signal(int); int sig_exit; 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) || Loading Loading @@ -86,7 +88,7 @@ void feh_handle_signal(int signo) case SIGQUIT: if (childpid) killpg(childpid, SIGINT); exit(128 + signo); sig_exit = 128 + signo; } winwid = winwidget_get_first_window_of_type(WIN_TYPE_SLIDESHOW); Loading
src/signals.h +1 −1 Original line number Diff line number Diff line Loading @@ -27,5 +27,5 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define SIGNALS_H void setup_signal_handlers(); extern int sig_exit; #endif