aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.h
diff options
context:
space:
mode:
authorverdant <im@verdant.ee>2026-07-28 20:36:13 +0800
committerverdant <im@verdant.ee>2026-07-28 20:44:30 +0800
commit14bdd63e40e913dfce20190de923d2aca0d1d45a (patch)
tree51b82d54265bea1273d4580da6f893709374f87a /src/process.h
parent1b5a26716b7d9050334d8ded58fe2c6ae7fe0143 (diff)
downloadsf-14bdd63e40e913dfce20190de923d2aca0d1d45a.tar.gz
sf-14bdd63e40e913dfce20190de923d2aca0d1d45a.zip
Add spawn wrapper for executing external commands
Inctroduce process.c and process.h providing spawn() function to fork a child process and execute commands via execvp(). Return -1 on invalid arguments or fork failure, and 0 on success.
Diffstat (limited to 'src/process.h')
-rw-r--r--src/process.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/process.h b/src/process.h
new file mode 100644
index 0000000..b817fa9
--- /dev/null
+++ b/src/process.h
@@ -0,0 +1,6 @@
+#ifndef SF_PROCESS_H
+#define SF_PROCESS_H
+
+int spawn(char **argv);
+
+#endif /* SF_PROCESS_H */