aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/c
diff options
context:
space:
mode:
authorpacien2018-02-24 01:37:36 +0100
committerpacien2018-02-24 01:37:36 +0100
commit3c1a29e2b8717a20948773bbc21abdc723ce5dee (patch)
treed802e31724a27ac8d9a1c9e0d2ab730a225d5031 /app/src/main/c
parentc29970d29bd3c4831fc2f80077d1d8548ed0fc15 (diff)
downloadtincapp-3c1a29e2b8717a20948773bbc21abdc723ce5dee.tar.gz
Handle daemon startup failures
Diffstat (limited to 'app/src/main/c')
-rw-r--r--app/src/main/c/exec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/c/exec.c b/app/src/main/c/exec.c
index d665341..5a76177 100644
--- a/app/src/main/c/exec.c
+++ b/app/src/main/c/exec.c
@@ -36,5 +36,7 @@ Java_org_pacien_tincapp_commands_Executor_forkExec(JNIEnv *env, jclass class, jo
36 36
37JNIEXPORT jint JNICALL 37JNIEXPORT jint JNICALL
38Java_org_pacien_tincapp_commands_Executor_wait(JNIEnv *env, jclass class, jint pid) { 38Java_org_pacien_tincapp_commands_Executor_wait(JNIEnv *env, jclass class, jint pid) {
39 return waitpid(pid, NULL, 0); 39 int status;
40 waitpid(pid, &status, 0);
41 return WIFEXITED(status) ? WEXITSTATUS(status) : -1;
40} 42}