summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2012-07-25 15:20:36 +0200
committerTor Andersson <tor.andersson@artifex.com>2012-07-25 15:20:36 +0200
commitc5c24ad6ecbfa1dfb4165d86de3e7ed49aef5022 (patch)
tree9f6c676df488434e1f177179d7147b6f37d96bd5 /apps
parent09241153b143eb35eb59c618759c5db9d114ebd1 (diff)
downloadmupdf-c5c24ad6ecbfa1dfb4165d86de3e7ed49aef5022.tar.xz
Exit in child process if fork/exec to open $BROWSER doesn't work.
Diffstat (limited to 'apps')
-rw-r--r--apps/x11_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/x11_main.c b/apps/x11_main.c
index 941afcfa..da156b06 100644
--- a/apps/x11_main.c
+++ b/apps/x11_main.c
@@ -571,7 +571,11 @@ void winopenuri(pdfapp_t *app, char *buf)
#endif
}
if (fork() == 0)
+ {
execlp(browser, browser, buf, (char*)0);
+ fprintf(stderr, "cannot exec '%s'\n", browser);
+ exit(0);
+ }
}
static void onkey(int c)