summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2012-03-15 21:16:16 +0100
committerDaniel Friesel <derf@finalrewind.org>2012-03-15 21:16:16 +0100
commit29cd868898660c58b1925bf3647c4c63b7bd3151 (patch)
treebe995936651b80fe6e4678662df69089b779ace1 /src
parent338553950063615b59d80d2148d208b490c3d0bd (diff)
--(un|)loadable: indicate results in exit code
Diffstat (limited to 'src')
-rw-r--r--src/list.c7
-rw-r--r--src/main.c2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/list.c b/src/list.c
index 17fcbcc..2affe85 100644
--- a/src/list.c
+++ b/src/list.c
@@ -77,6 +77,7 @@ void real_loadables_mode(int loadable)
{
feh_file *file;
gib_list *l;
+ char ret = 0;
opt.quiet = 1;
@@ -91,6 +92,8 @@ void real_loadables_mode(int loadable)
puts(file->filename);
feh_action_run(file, opt.actions[0]);
}
+ else
+ ret = 1;
gib_imlib_free_image_and_decache(im);
} else {
/* Oh dear. */
@@ -98,7 +101,9 @@ void real_loadables_mode(int loadable)
puts(file->filename);
feh_action_run(file, opt.actions[0]);
}
+ else
+ ret = 1;
}
}
- exit(0);
+ exit(ret);
}
diff --git a/src/main.c b/src/main.c
index a5694fb..e6239e1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -44,12 +44,12 @@ int main(int argc, char **argv)
init_parse_options(argc, argv);
init_imlib_fonts();
+ setup_signal_handlers();
if (opt.display) {
init_x_and_imlib();
init_keyevents();
init_buttonbindings();
- setup_signal_handlers();
}
feh_event_init();