summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2012-03-14 13:09:02 +0100
committerDaniel Friesel <derf@finalrewind.org>2012-03-14 13:09:02 +0100
commit86a6ae59b3b2b63fd71c4668bfcf33d6fea8448b (patch)
tree44e36b3b8080a39faa55c98457e033811ded73dc
parent57e2af2763ee87bafb368390fd18382c957fd27e (diff)
downloadfeh-86a6ae59b3b2b63fd71c4668bfcf33d6fea8448b.zip
imlib.c: "Fix" Zombie issue
Still to do: signal handler for sigint/quit/term
-rw-r--r--src/imlib.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/imlib.c b/src/imlib.c
index 1e4eb3f..d83cc08 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -315,6 +315,17 @@ static char *feh_magick_load_image(char *filename)
weprintf("%s - No loader for that file format",
filename);
}
+
+ /*
+ * Reap child. The previous waitpid call was interrupted by
+ * alarm, but convert doesn't terminate immediately.
+ * XXX
+ * normally, if (WIFSIGNALED(status)) waitpid(childpid, &status, 0);
+ * would suffice. However, as soon as feh has its own window,
+ * this doesn't work anymore and the following workaround is
+ * required. Hm.
+ */
+ waitpid(-1, &status, 0);
}
}