Commit 96597253 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Error messages if setsid or fork fail

Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent 32ad4644
......@@ -4,6 +4,7 @@
#include <girara/settings.h>
#include <glib/gi18n.h>
#include <glib/gstdio.h>
#include <errno.h>
#include <limits.h>
#include <locale.h>
#include <stdio.h>
......@@ -155,10 +156,14 @@ main(int argc, char* argv[])
if (pid > 0) { /* parent */
return 0;
} else if (pid < 0) { /* error */
girara_error("Couldn't fork.");
girara_error("Could not fork: %s", strerror(errno));
return -1;
}
setsid();
if (setsid() == -1) {
girara_error("Could not start new process group: %s", strerror(errno));
return -1;
}
}
/* create zathura session */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment