aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/main.c b/main.c
index 4652583..a5f091b 100644
--- a/main.c
+++ b/main.c
@@ -43,11 +43,16 @@ int main(int argc, char **argv) {
setbuf(stdout, NULL);
a_env.pid = getppid();
signal(SIGHUP, SIG_IGN);
- if (sd_setup()) {
+ int r = sd_setup();
+ if (r == -1) {
+ sd_cleanup();
+ return 13;
+ }
+ if (r) {
sd_cleanup();
return main_consent(0);
} else {
- int r = main_consent(1);
+ r = main_consent(1);
sd_cleanup();
return r;
}