ReactOS 0.4.16-dev-2122-g1628f5e
process.h
Go to the documentation of this file.
1/*
2 * Process definitions
3 *
4 * Derived from the mingw header written by Colin Peters.
5 * Modified for Wine use by Jon Griffiths and Francois Gouget.
6 * This file is in the public domain.
7 */
8#ifndef __WINE_PROCESS_H
9#define __WINE_PROCESS_H
10
11#include <corecrt_startup.h>
12#include <corecrt_wprocess.h>
13
14/* Process creation flags */
15#define _P_WAIT 0
16#define _P_NOWAIT 1
17#define _P_OVERLAY 2
18#define _P_NOWAITO 3
19#define _P_DETACH 4
20
21#define _WAIT_CHILD 0
22#define _WAIT_GRANDCHILD 1
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
29typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *);
30
32_ACRTIMP uintptr_t __cdecl _beginthreadex(void*,unsigned int,_beginthreadex_start_routine_t,void*,unsigned int,unsigned int*);
36_ACRTIMP intptr_t __cdecl _execl(const char*,const char*,...);
37_ACRTIMP intptr_t __cdecl _execle(const char*,const char*,...);
38_ACRTIMP intptr_t __cdecl _execlp(const char*,const char*,...);
39_ACRTIMP intptr_t __cdecl _execlpe(const char*,const char*,...);
40_ACRTIMP intptr_t __cdecl _execv(const char*,const char* const *);
41_ACRTIMP intptr_t __cdecl _execve(const char*,const char* const *,const char* const *);
42_ACRTIMP intptr_t __cdecl _execvp(const char*,const char* const *);
43_ACRTIMP intptr_t __cdecl _execvpe(const char*,const char* const *,const char* const *);
44_ACRTIMP int __cdecl _getpid(void);
45_ACRTIMP intptr_t __cdecl _spawnl(int,const char*,const char*,...);
46_ACRTIMP intptr_t __cdecl _spawnle(int,const char*,const char*,...);
47_ACRTIMP intptr_t __cdecl _spawnlp(int,const char*,const char*,...);
48_ACRTIMP intptr_t __cdecl _spawnlpe(int,const char*,const char*,...);
49_ACRTIMP intptr_t __cdecl _spawnv(int,const char*,const char* const *);
50_ACRTIMP intptr_t __cdecl _spawnve(int,const char*,const char* const *,const char* const *);
51_ACRTIMP intptr_t __cdecl _spawnvp(int,const char*,const char* const *);
52_ACRTIMP intptr_t __cdecl _spawnvpe(int,const char*,const char* const *,const char* const *);
53
54_ACRTIMP void __cdecl _c_exit(void);
55_ACRTIMP void __cdecl _cexit(void);
60_ACRTIMP int __cdecl system(const char*);
61
62#ifdef __cplusplus
63}
64#endif
65
66
67#define P_WAIT _P_WAIT
68#define P_NOWAIT _P_NOWAIT
69#define P_OVERLAY _P_OVERLAY
70#define P_NOWAITO _P_NOWAITO
71#define P_DETACH _P_DETACH
72
73#define WAIT_CHILD _WAIT_CHILD
74#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
75
76static inline intptr_t cwait(int *status, intptr_t pid, int action) { return _cwait(status, pid, action); }
77static inline int getpid(void) { return _getpid(); }
78static inline intptr_t spawnv(int flags, const char* name, const char* const* argv) { return _spawnv(flags, name, argv); }
79static inline intptr_t spawnve(int flags, const char* name, const char* const* argv, const char* const* envv) { return _spawnve(flags, name, argv, envv); }
80static inline intptr_t spawnvp(int flags, const char* name, const char* const* argv) { return _spawnvp(flags, name, argv); }
81static inline intptr_t spawnvpe(int flags, const char* name, const char* const* argv, const char* const* envv) { return _spawnvpe(flags, name, argv, envv); }
82#define execv _execv
83#define execve _execve
84#define execvp _execvp
85#define execvpe _execvpe
86
87#if defined(__GNUC__) && (__GNUC__ < 4)
88_ACRTIMP intptr_t __cdecl execl(const char*,const char*,...) __attribute__((alias("_execl")));
96#else
97#define execl _execl
98#define execle _execle
99#define execlp _execlp
100#define execlpe _execlpe
101#define spawnl _spawnl
102#define spawnle _spawnle
103#define spawnlp _spawnlp
104#define spawnlpe _spawnlpe
105#endif /* __GNUC__ */
106
107#endif /* __WINE_PROCESS_H */
const WCHAR * alias
Definition: main.c:67
int intptr_t
Definition: corecrt.h:176
#define __cdecl
Definition: corecrt.h:121
#define _ACRTIMP
Definition: corecrt.h:153
unsigned int uintptr_t
Definition: corecrt.h:185
#define __stdcall
Definition: corecrt.h:120
#define DECLSPEC_NORETURN
Definition: corecrt.h:131
_ACRTIMP DECLSPEC_NORETURN void __cdecl abort(void)
Aborts the program.
Definition: exit.c:252
_ACRTIMP DECLSPEC_NORETURN void __cdecl _exit(int)
Definition: exit.c:187
_ACRTIMP int __cdecl system(const char *)
Definition: process.c:1297
#define spawnl
Definition: process.h:101
_ACRTIMP intptr_t __cdecl _execvp(const char *, const char *const *)
Definition: process.c:679
#define spawnlpe
Definition: process.h:104
_ACRTIMP intptr_t __cdecl _spawnl(int, const char *, const char *,...)
Definition: process.c:711
_ACRTIMP intptr_t __cdecl _spawnvpe(int, const char *, const char *const *, const char *const *)
Definition: process.c:967
static intptr_t spawnve(int flags, const char *name, const char *const *argv, const char *const *envv)
Definition: process.h:79
#define execle
Definition: process.h:98
#define spawnlp
Definition: process.h:103
_ACRTIMP int __cdecl _getpid(void)
Definition: process.c:1360
_ACRTIMP intptr_t __cdecl _execv(const char *, const char *const *)
Definition: process.c:616
unsigned int(__stdcall * _beginthreadex_start_routine_t)(void *)
Definition: process.h:29
#define execlp
Definition: process.h:99
_ACRTIMP uintptr_t __cdecl _beginthreadex(void *, unsigned int, _beginthreadex_start_routine_t, void *, unsigned int, unsigned int *)
Definition: thread.c:207
_ACRTIMP void __cdecl _cexit(void)
Definition: exit.c:336
_ACRTIMP DECLSPEC_NORETURN void __cdecl _endthreadex(unsigned int)
Definition: thread.c:93
_ACRTIMP intptr_t __cdecl _execle(const char *, const char *,...)
Definition: process.c:468
static intptr_t spawnvpe(int flags, const char *name, const char *const *argv, const char *const *envv)
Definition: process.h:81
static intptr_t spawnvp(int flags, const char *name, const char *const *argv)
Definition: process.h:80
_ACRTIMP intptr_t __cdecl _cwait(int *, intptr_t, int)
Definition: process.c:362
_ACRTIMP intptr_t __cdecl _execlp(const char *, const char *,...)
Definition: process.c:522
_ACRTIMP intptr_t __cdecl _execvpe(const char *, const char *const *, const char *const *)
Definition: process.c:658
#define execlpe
Definition: process.h:100
#define execl
Definition: process.h:97
_ACRTIMP intptr_t __cdecl _spawnlpe(int, const char *, const char *,...)
Definition: process.c:867
static int getpid(void)
Definition: process.h:77
_ACRTIMP uintptr_t __cdecl _beginthread(_beginthread_start_routine_t, unsigned int, void *)
Definition: thread.c:134
static intptr_t spawnv(int flags, const char *name, const char *const *argv)
Definition: process.h:78
static intptr_t cwait(int *status, intptr_t pid, int action)
Definition: process.h:76
_ACRTIMP intptr_t __cdecl _execve(const char *, const char *const *, const char *const *)
Definition: process.c:637
_ACRTIMP intptr_t __cdecl _spawnvp(int, const char *, const char *const *)
Definition: process.c:1013
_ACRTIMP intptr_t __cdecl _spawnv(int, const char *, const char *const *)
Definition: process.c:946
_ACRTIMP intptr_t __cdecl _spawnlp(int, const char *, const char *,...)
Definition: process.c:816
_ACRTIMP void __cdecl _c_exit(void)
Definition: exit.c:327
_ACRTIMP intptr_t __cdecl _execlpe(const char *, const char *,...)
Definition: process.c:573
_ACRTIMP intptr_t __cdecl _spawnle(int, const char *, const char *,...)
Definition: process.c:762
_ACRTIMP DECLSPEC_NORETURN void __cdecl _endthread(void)
Definition: thread.c:73
void(__cdecl * _beginthread_start_routine_t)(void *)
Definition: process.h:28
_ACRTIMP intptr_t __cdecl _execl(const char *, const char *,...)
Definition: process.c:417
_ACRTIMP intptr_t __cdecl _spawnve(int, const char *, const char *const *, const char *const *)
Definition: process.c:900
_ACRTIMP DECLSPEC_NORETURN void __cdecl quick_exit(int)
Definition: exit.cpp:304
#define spawnle
Definition: process.h:102
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
action
Definition: namespace.c:707
GLbitfield flags
Definition: glext.h:7161
#define argv
Definition: mplay32.c:18
#define exit(n)
Definition: config.h:202
Definition: name.c:39
Definition: ps.c:97
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3837
#define const
Definition: zconf.h:233