From 680fe07b6ea000ee29ac28e2f48665433e7011df Mon Sep 17 00:00:00 2001 From: pacien Date: Wed, 14 Feb 2018 01:25:48 +0100 Subject: Properly get daemon state --- app/src/main/c/exec.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/src/main/c') diff --git a/app/src/main/c/exec.c b/app/src/main/c/exec.c index a9871a5..d665341 100644 --- a/app/src/main/c/exec.c +++ b/app/src/main/c/exec.c @@ -1,6 +1,7 @@ #include #include #include +#include static inline const char **to_string_array(JNIEnv *env, jobjectArray ja) { const int len = (*env)->GetArrayLength(env, ja); @@ -32,3 +33,8 @@ Java_org_pacien_tincapp_commands_Executor_forkExec(JNIEnv *env, jclass class, jo return pid; } } + +JNIEXPORT jint JNICALL +Java_org_pacien_tincapp_commands_Executor_wait(JNIEnv *env, jclass class, jint pid) { + return waitpid(pid, NULL, 0); +} -- cgit v1.2.3