Skip to content
Snippets Groups Projects
Commit 171ebcfe authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

signals.c: Globally initialize sig_exit; return immediately after SIGTERM etc

parent 9de97b3a
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment