summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-06-23 11:25:03 +0200
committerDaniel Friesel <derf@finalrewind.org>2016-06-23 11:25:03 +0200
commit8f5a842412996d3d8fa573c2da000f397d530c6b (patch)
treeccc78fe3c507634f788818d863e30c8e48094d25
parentb72ab18c95c1c3e98c64558a18cce8fb23a4ec21 (diff)
imlib/rotate: Fail gracefully when fork() fails
-rw-r--r--src/imlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/imlib.c b/src/imlib.c
index e8b3b3d..fb1a589 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -1173,7 +1173,8 @@ void feh_edit_inplace_lossless(winwidget w, int op)
if ((pid = fork()) < 0) {
im_weprintf(w, "lossless %s: fork failed:", op_name);
- exit(1);
+ free(file_str);
+ return;
}
else if (pid == 0) {
@@ -1197,8 +1198,7 @@ void feh_edit_inplace_lossless(winwidget w, int op)
}
}
if ((pid = fork()) < 0) {
- im_weprintf(w, "lossless %s: cannot fix rotation: fork:", op_name);
- exit(1);
+ im_weprintf(w, "lossless %s: fork failed while updating EXIF tags:", op_name);
}
else if (pid == 0) {