summaryrefslogtreecommitdiff
path: root/newlib/libc/include/process.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-12-15 09:38:53 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2017-12-15 09:39:34 -0500
commitf95a4a932476be2ba99e2fd081e8d2bc6ea12813 (patch)
tree75f67192cb2d7b7b575c94edda318e475239b63c /newlib/libc/include/process.h
parentf60aca96985e68c7d8a52eb7bc955fb80e132f73 (diff)
Import newlib and create makefile
Diffstat (limited to 'newlib/libc/include/process.h')
-rw-r--r--newlib/libc/include/process.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/newlib/libc/include/process.h b/newlib/libc/include/process.h
new file mode 100644
index 0000000..ca5b451
--- /dev/null
+++ b/newlib/libc/include/process.h
@@ -0,0 +1,60 @@
+/* process.h. This file comes with MSDOS and WIN32 systems. */
+
+#ifndef __PROCESS_H_
+#define __PROCESS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int execl(const char *path, const char *argv0, ...);
+int execle(const char *path, const char *argv0, ... /*, char * const *envp */);
+int execlp(const char *path, const char *argv0, ...);
+int execlpe(const char *path, const char *argv0, ... /*, char * const *envp */);
+
+int execv(const char *path, char * const *argv);
+int execve(const char *path, char * const *argv, char * const *envp);
+int execvp(const char *path, char * const *argv);
+int execvpe(const char *path, char * const *argv, char * const *envp);
+
+int spawnl(int mode, const char *path, const char *argv0, ...);
+int spawnle(int mode, const char *path, const char *argv0, ... /*, char * const *envp */);
+int spawnlp(int mode, const char *path, const char *argv0, ...);
+int spawnlpe(int mode, const char *path, const char *argv0, ... /*, char * const *envp */);
+
+int spawnv(int mode, const char *path, const char * const *argv);
+int spawnve(int mode, const char *path, char * const *argv, const char * const *envp);
+int spawnvp(int mode, const char *path, const char * const *argv);
+int spawnvpe(int mode, const char *path, const char * const *argv, const char * const *envp);
+
+#ifdef __CYGWIN32__
+/* Secure exec() functions family */
+/* The first arg should really be a HANDLE which is a void *. But we
+ can't include windows.h here so... */
+#include <sys/types.h>
+pid_t sexecl(void *, const char *path, const char *argv0, ...);
+pid_t sexecle(void *, const char *path, const char *argv0, ... /*, char * const *envp */);
+pid_t sexeclp(void *, const char *path, const char *argv0, ...);
+pid_t sexeclpe(void *, const char *path, const char *argv0, ... /*, char * const *envp */);
+
+pid_t sexecv(void *, const char *path, const char * const *argv);
+pid_t sexecve(void *, const char *path, const char * const *argv, const char * const *envp);
+pid_t sexecvp(void *, const char *path, const char * const *argv);
+pid_t sexecvpe(void *, const char *path, const char * const *argv, const char * const *envp);
+#endif
+
+int cwait(int *, int, int);
+
+#define _P_WAIT 1
+#define _P_NOWAIT 2 /* always generates error */
+#define _P_OVERLAY 3
+#define _P_NOWAITO 4
+#define _P_DETACH 5
+
+#define WAIT_CHILD 1
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif