run-tests.sh: use --no-symlinks
[msysgit.git] / mingw / include / process.h
blobbdc2f0c59d209b7a08c9db7945eab5df2687f68a
1 /*
2 * process.h
3 * This file has no copyright assigned and is placed in the Public Domain.
4 * This file is a part of the mingw-runtime package.
5 * No warranty is given; refer to the file DISCLAIMER within the package.
7 * Function calls for spawning child processes.
9 */
11 #ifndef _PROCESS_H_
12 #define _PROCESS_H_
14 /* All the headers include this file. */
15 #include <_mingw.h>
17 /* Includes a definition of _pid_t and pid_t */
18 #include <sys/types.h>
21 * Constants for cwait actions.
22 * Obsolete for Win32.
24 #define _WAIT_CHILD 0
25 #define _WAIT_GRANDCHILD 1
27 #ifndef _NO_OLDNAMES
28 #define WAIT_CHILD _WAIT_CHILD
29 #define WAIT_GRANDCHILD _WAIT_GRANDCHILD
30 #endif /* Not _NO_OLDNAMES */
33 * Mode constants for spawn functions.
35 #define _P_WAIT 0
36 #define _P_NOWAIT 1
37 #define _P_OVERLAY 2
38 #define _OLD_P_OVERLAY _P_OVERLAY
39 #define _P_NOWAITO 3
40 #define _P_DETACH 4
42 #ifndef _NO_OLDNAMES
43 #define P_WAIT _P_WAIT
44 #define P_NOWAIT _P_NOWAIT
45 #define P_OVERLAY _P_OVERLAY
46 #define OLD_P_OVERLAY _OLD_P_OVERLAY
47 #define P_NOWAITO _P_NOWAITO
48 #define P_DETACH _P_DETACH
49 #endif /* Not _NO_OLDNAMES */
52 #ifndef RC_INVOKED
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
58 _CRTIMP void __cdecl _cexit(void);
59 _CRTIMP void __cdecl _c_exit(void);
61 _CRTIMP int __cdecl _cwait (int*, _pid_t, int);
63 _CRTIMP _pid_t __cdecl _getpid(void);
65 _CRTIMP int __cdecl _execl (const char*, const char*, ...);
66 _CRTIMP int __cdecl _execle (const char*, const char*, ...);
67 _CRTIMP int __cdecl _execlp (const char*, const char*, ...);
68 _CRTIMP int __cdecl _execlpe (const char*, const char*, ...);
69 _CRTIMP int __cdecl _execv (const char*, const char* const*);
70 _CRTIMP int __cdecl _execve (const char*, const char* const*, const char* const*);
71 _CRTIMP int __cdecl _execvp (const char*, const char* const*);
72 _CRTIMP int __cdecl _execvpe (const char*, const char* const*, const char* const*);
74 _CRTIMP int __cdecl _spawnl (int, const char*, const char*, ...);
75 _CRTIMP int __cdecl _spawnle (int, const char*, const char*, ...);
76 _CRTIMP int __cdecl _spawnlp (int, const char*, const char*, ...);
77 _CRTIMP int __cdecl _spawnlpe (int, const char*, const char*, ...);
78 _CRTIMP int __cdecl _spawnv (int, const char*, const char* const*);
79 _CRTIMP int __cdecl _spawnve (int, const char*, const char* const*, const char* const*);
80 _CRTIMP int __cdecl _spawnvp (int, const char*, const char* const*);
81 _CRTIMP int __cdecl _spawnvpe (int, const char*, const char* const*, const char* const*);
85 * The functions _beginthreadex and _endthreadex are not provided by CRTDLL.
86 * They are provided by MSVCRT.
88 * NOTE: Apparently _endthread calls CloseHandle on the handle of the thread,
89 * making for race conditions if you are not careful. Basically you have to
90 * make sure that no-one is going to do *anything* with the thread handle
91 * after the thread calls _endthread or returns from the thread function.
93 * NOTE: No old names for these functions. Use the underscore.
95 _CRTIMP unsigned long __cdecl
96 _beginthread (void (*)(void *), unsigned, void*);
97 _CRTIMP void __cdecl _endthread (void);
99 #ifdef __MSVCRT__
100 _CRTIMP unsigned long __cdecl
101 _beginthreadex (void *, unsigned, unsigned (__stdcall *) (void *),
102 void*, unsigned, unsigned*);
103 _CRTIMP void __cdecl _endthreadex (unsigned);
104 #endif
107 #ifndef _NO_OLDNAMES
109 * Functions without the leading underscore, for portability. These functions
110 * live in liboldnames.a.
112 _CRTIMP int __cdecl cwait (int*, pid_t, int);
113 _CRTIMP pid_t __cdecl getpid (void);
114 _CRTIMP int __cdecl execl (const char*, const char*, ...);
115 _CRTIMP int __cdecl execle (const char*, const char*, ...);
116 _CRTIMP int __cdecl execlp (const char*, const char*, ...);
117 _CRTIMP int __cdecl execlpe (const char*, const char*, ...);
118 _CRTIMP int __cdecl execv (const char*, const char* const*);
119 _CRTIMP int __cdecl execve (const char*, const char* const*, const char* const*);
120 _CRTIMP int __cdecl execvp (const char*, const char* const*);
121 _CRTIMP int __cdecl execvpe (const char*, const char* const*, const char* const*);
122 _CRTIMP int __cdecl spawnl (int, const char*, const char*, ...);
123 _CRTIMP int __cdecl spawnle (int, const char*, const char*, ...);
124 _CRTIMP int __cdecl spawnlp (int, const char*, const char*, ...);
125 _CRTIMP int __cdecl spawnlpe (int, const char*, const char*, ...);
126 _CRTIMP int __cdecl spawnv (int, const char*, const char* const*);
127 _CRTIMP int __cdecl spawnve (int, const char*, const char* const*, const char* const*);
128 _CRTIMP int __cdecl spawnvp (int, const char*, const char* const*);
129 _CRTIMP int __cdecl spawnvpe (int, const char*, const char* const*, const char* const*);
130 #endif /* Not _NO_OLDNAMES */
132 #ifdef __cplusplus
134 #endif
136 #endif /* Not RC_INVOKED */
138 #endif /* _PROCESS_H_ not defined */