summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/child_common.c12
-rw-r--r--src/util/child_common.h1
2 files changed, 5 insertions, 8 deletions
diff --git a/src/util/child_common.c b/src/util/child_common.c
index 05f00b0f..5f0b2659 100644
--- a/src/util/child_common.c
+++ b/src/util/child_common.c
@@ -695,14 +695,10 @@ errno_t exec_child(TALLOC_CTX *mem_ctx,
return ret;
}
- ret = execv(binary, argv);
- if (ret == -1) {
- err = errno;
- DEBUG(1, ("execv failed [%d][%s].\n", err, strerror(err)));
- return err;
- }
-
- return EOK;
+ execv(binary, argv);
+ err = errno;
+ DEBUG(SSSDBG_OP_FAILURE, ("execv failed [%d][%s].\n", err, strerror(err)));
+ return err;
}
void child_cleanup(int readfd, int writefd)
diff --git a/src/util/child_common.h b/src/util/child_common.h
index 1e9f1b6c..237969f2 100644
--- a/src/util/child_common.h
+++ b/src/util/child_common.h
@@ -100,6 +100,7 @@ void child_sig_handler(struct tevent_context *ev,
struct tevent_signal *sige, int signum,
int count, void *__siginfo, void *pvt);
+/* Never returns EOK, ether returns an error, or doesn't return on success */
errno_t exec_child(TALLOC_CTX *mem_ctx,
int *pipefd_to_child, int *pipefd_from_child,
const char *binary, int debug_fd);