aboutsummaryrefslogtreecommitdiff
path: root/include/system.h
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2023-10-26 19:53:29 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2023-10-26 19:53:29 -0400
commit17178535cc9df5e834dfd43e3b2b919e02e5798d (patch)
tree5e55e8b2c2453ccf6271b190cf45e90d2c25179d /include/system.h
downloadstasis-17178535cc9df5e834dfd43e3b2b919e02e5798d.tar.gz
Initial commit
Diffstat (limited to 'include/system.h')
-rw-r--r--include/system.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/system.h b/include/system.h
new file mode 100644
index 0000000..a922c69
--- /dev/null
+++ b/include/system.h
@@ -0,0 +1,28 @@
+//
+// Created by jhunk on 10/4/23.
+//
+
+#ifndef OHMYCAL_SYSTEM_H
+#define OHMYCAL_SYSTEM_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <limits.h>
+#include <sys/wait.h>
+#include <sys/stat.h>
+
+struct Process {
+ char stdout[PATH_MAX];
+ char stderr[PATH_MAX];
+ int redirect_stderr;
+ int returncode;
+};
+
+int shell(struct Process *proc, char *args[]);
+int shell2(struct Process *proc, char *args);
+int shell_safe(struct Process *proc, char *args[]);
+
+#endif //OHMYCAL_SYSTEM_H