summaryrefslogtreecommitdiff
path: root/src/libc/include/spawn.h
diff options
context:
space:
mode:
authordzwdz2023-08-27 02:06:32 +0200
committerdzwdz2023-08-27 02:06:32 +0200
commite43939bcc6123e02314aa403eef94d5ace441f7f (patch)
treeac0cea10e8708ae1a6a7a400257c4bc59175a91f /src/libc/include/spawn.h
parent1f938c20b4a82ca1267ab9a1ec0922878a21ca6b (diff)
ports: qbe, cproc :^)
Diffstat (limited to 'src/libc/include/spawn.h')
-rw-r--r--src/libc/include/spawn.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/libc/include/spawn.h b/src/libc/include/spawn.h
new file mode 100644
index 0000000..936518a
--- /dev/null
+++ b/src/libc/include/spawn.h
@@ -0,0 +1,21 @@
+#pragma once
+#include <sys/types.h>
+
+typedef struct {
+ struct file_action *f;
+} posix_spawn_file_actions_t;
+
+typedef struct {} posix_spawnattr_t;
+
+int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *facts, int from, int to);
+int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *facts);
+int posix_spawn_file_actions_init(posix_spawn_file_actions_t *facts);
+
+int posix_spawnp(
+ pid_t *restrict pid,
+ const char *restrict file,
+ const posix_spawn_file_actions_t *restrict file_actions,
+ const posix_spawnattr_t *restrict attrp,
+ char *const argv[restrict],
+ char *const envp[restrict]
+);