summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-09-20 21:27:39 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-09-20 21:27:39 +0200
commita9d46da64d02561bf2f545b3271575b304eda913 (patch)
treeade6aed4119fd959bafed07f9f745f488898004b /src
parente313c6dd3dc36004d97c62cb1ae78e2bc5555bf9 (diff)
Handle SIGTERM, SIGINT, SIGQUIT during preload
Diffstat (limited to 'src')
-rw-r--r--src/filelist.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/filelist.c b/src/filelist.c
index b492965..fc9fa35 100644
--- a/src/filelist.c
+++ b/src/filelist.c
@@ -37,6 +37,7 @@ gib_list *original_file_items = NULL; /* original file items from argv */
int filelist_len = 0;
gib_list *current_file = NULL;
extern int errno;
+extern int sig_exit; /* exit flag from signal handler */
static gib_list *rm_filelist = NULL;
@@ -327,6 +328,10 @@ gib_list *feh_file_info_preload(gib_list * list)
feh_display_status('s');
} else if (opt.verbose)
feh_display_status('.');
+ if (sig_exit) {
+ feh_display_status(0);
+ exit(sig_exit);
+ }
}
if (opt.verbose)
feh_display_status(0);