aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/os.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/os.h')
-rw-r--r--src/utils/os.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/utils/os.h b/src/utils/os.h
index 3058b88..afb99bd 100644
--- a/src/utils/os.h
+++ b/src/utils/os.h
@@ -479,6 +479,15 @@ char * os_strdup(const char *s);
*/
size_t os_strlcpy(char *dest, const char *src, size_t siz);
+/**
+ * os_exec - Execute an external program
+ * @program: Path to the program
+ * @arg: Command line argument string
+ * @wait_completion: Whether to wait until the program execution completes
+ * Returns: 0 on success, -1 on error
+ */
+int os_exec(const char *program, const char *arg, int wait_completion);
+
#ifdef OS_REJECT_C_LIB_FUNCTIONS
#define malloc OS_DO_NOT_USE_malloc