summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-08-05 06:10:40 +0200
committerDaniel Friesel <derf@finalrewind.org>2017-08-05 06:10:40 +0200
commit0c5ed69263a38b0b9188c83633bd1f48f65df396 (patch)
tree54d80822aba050231257788d3a0e2600b60e5930 /src
parent42ef8d9847e8a69148b23f8fabc71384bd697a73 (diff)
Show ImageMagick output on the terminal unless --quiet is specified
(cf #309)
Diffstat (limited to 'src')
-rw-r--r--src/imlib.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/imlib.c b/src/imlib.c
index 193f5f8..ecc44b5 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -323,11 +323,13 @@ static char *feh_magick_load_image(char *filename)
}
else if (childpid == 0) {
- /* discard convert output */
devnull = open("/dev/null", O_WRONLY);
dup2(devnull, 0);
- dup2(devnull, 1);
- dup2(devnull, 2);
+ if (opt.quiet) {
+ /* discard convert output */
+ dup2(devnull, 1);
+ dup2(devnull, 2);
+ }
/*
* convert only accepts SIGINT via killpg, a normal kill doesn't work