aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/c/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/c/exec.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}