2001-04-11 01:21:43 +02:00
|
|
|
/*
|
|
|
|
* Process definitions
|
|
|
|
*
|
|
|
|
* Derived from the mingw header written by Colin Peters.
|
|
|
|
* Modified for Wine use by Jon Griffiths and Francois Gouget.
|
|
|
|
* This file is in the public domain.
|
|
|
|
*/
|
|
|
|
#ifndef __WINE_PROCESS_H
|
|
|
|
#define __WINE_PROCESS_H
|
|
|
|
|
2008-12-11 22:37:34 +01:00
|
|
|
#include <crtdefs.h>
|
2001-04-11 01:21:43 +02:00
|
|
|
|
|
|
|
/* Process creation flags */
|
|
|
|
#define _P_WAIT 0
|
|
|
|
#define _P_NOWAIT 1
|
|
|
|
#define _P_OVERLAY 2
|
|
|
|
#define _P_NOWAITO 3
|
|
|
|
#define _P_DETACH 4
|
|
|
|
|
|
|
|
#define _WAIT_CHILD 0
|
|
|
|
#define _WAIT_GRANDCHILD 1
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2009-01-03 18:43:00 +01:00
|
|
|
typedef void (__cdecl *_beginthread_start_routine_t)(void *);
|
2002-02-02 19:42:11 +01:00
|
|
|
typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *);
|
2001-06-19 05:46:27 +02:00
|
|
|
|
2008-12-17 14:45:18 +01:00
|
|
|
uintptr_t __cdecl _beginthread(_beginthread_start_routine_t,unsigned int,void*);
|
|
|
|
uintptr_t __cdecl _beginthreadex(void*,unsigned int,_beginthreadex_start_routine_t,void*,unsigned int,unsigned int*);
|
|
|
|
intptr_t __cdecl _cwait(int*,intptr_t,int);
|
|
|
|
void __cdecl _endthread(void);
|
|
|
|
void __cdecl _endthreadex(unsigned int);
|
2017-11-02 10:19:18 +01:00
|
|
|
intptr_t WINAPIV _execl(const char*,const char*,...);
|
|
|
|
intptr_t WINAPIV _execle(const char*,const char*,...);
|
|
|
|
intptr_t WINAPIV _execlp(const char*,const char*,...);
|
|
|
|
intptr_t WINAPIV _execlpe(const char*,const char*,...);
|
2013-04-09 13:45:48 +02:00
|
|
|
intptr_t __cdecl _execv(const char*,const char* const *);
|
|
|
|
intptr_t __cdecl _execve(const char*,const char* const *,const char* const *);
|
|
|
|
intptr_t __cdecl _execvp(const char*,const char* const *);
|
|
|
|
intptr_t __cdecl _execvpe(const char*,const char* const *,const char* const *);
|
2008-12-17 14:45:18 +01:00
|
|
|
int __cdecl _getpid(void);
|
2017-11-02 10:19:18 +01:00
|
|
|
intptr_t WINAPIV _spawnl(int,const char*,const char*,...);
|
|
|
|
intptr_t WINAPIV _spawnle(int,const char*,const char*,...);
|
|
|
|
intptr_t WINAPIV _spawnlp(int,const char*,const char*,...);
|
|
|
|
intptr_t WINAPIV _spawnlpe(int,const char*,const char*,...);
|
2008-12-17 14:45:18 +01:00
|
|
|
intptr_t __cdecl _spawnv(int,const char*,const char* const *);
|
|
|
|
intptr_t __cdecl _spawnve(int,const char*,const char* const *,const char* const *);
|
|
|
|
intptr_t __cdecl _spawnvp(int,const char*,const char* const *);
|
|
|
|
intptr_t __cdecl _spawnvpe(int,const char*,const char* const *,const char* const *);
|
2001-04-11 01:21:43 +02:00
|
|
|
|
2008-12-17 14:45:18 +01:00
|
|
|
void __cdecl _c_exit(void);
|
|
|
|
void __cdecl _cexit(void);
|
|
|
|
void __cdecl _exit(int);
|
|
|
|
void __cdecl abort(void);
|
|
|
|
void __cdecl exit(int);
|
|
|
|
int __cdecl system(const char*);
|
2004-06-25 03:19:15 +02:00
|
|
|
|
|
|
|
#ifndef _WPROCESS_DEFINED
|
|
|
|
#define _WPROCESS_DEFINED
|
2017-11-02 10:19:18 +01:00
|
|
|
intptr_t WINAPIV _wexecl(const wchar_t*,const wchar_t*,...);
|
|
|
|
intptr_t WINAPIV _wexecle(const wchar_t*,const wchar_t*,...);
|
|
|
|
intptr_t WINAPIV _wexeclp(const wchar_t*,const wchar_t*,...);
|
|
|
|
intptr_t WINAPIV _wexeclpe(const wchar_t*,const wchar_t*,...);
|
2008-12-17 14:45:18 +01:00
|
|
|
intptr_t __cdecl _wexecv(const wchar_t*,const wchar_t* const *);
|
|
|
|
intptr_t __cdecl _wexecve(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
|
|
|
|
intptr_t __cdecl _wexecvp(const wchar_t*,const wchar_t* const *);
|
|
|
|
intptr_t __cdecl _wexecvpe(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
|
2017-11-02 10:19:18 +01:00
|
|
|
intptr_t WINAPIV _wspawnl(int,const wchar_t*,const wchar_t*,...);
|
|
|
|
intptr_t WINAPIV _wspawnle(int,const wchar_t*,const wchar_t*,...);
|
|
|
|
intptr_t WINAPIV _wspawnlp(int,const wchar_t*,const wchar_t*,...);
|
|
|
|
intptr_t WINAPIV _wspawnlpe(int,const wchar_t*,const wchar_t*,...);
|
2008-12-17 14:45:18 +01:00
|
|
|
intptr_t __cdecl _wspawnv(int,const wchar_t*,const wchar_t* const *);
|
|
|
|
intptr_t __cdecl _wspawnve(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
|
|
|
|
intptr_t __cdecl _wspawnvp(int,const wchar_t*,const wchar_t* const *);
|
|
|
|
intptr_t __cdecl _wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
|
|
|
|
int __cdecl _wsystem(const wchar_t*);
|
2004-06-25 03:19:15 +02:00
|
|
|
#endif /* _WPROCESS_DEFINED */
|
2001-04-11 01:21:43 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#define P_WAIT _P_WAIT
|
|
|
|
#define P_NOWAIT _P_NOWAIT
|
|
|
|
#define P_OVERLAY _P_OVERLAY
|
|
|
|
#define P_NOWAITO _P_NOWAITO
|
|
|
|
#define P_DETACH _P_DETACH
|
|
|
|
|
|
|
|
#define WAIT_CHILD _WAIT_CHILD
|
|
|
|
#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
|
|
|
|
|
2005-11-03 14:17:51 +01:00
|
|
|
static inline intptr_t cwait(int *status, intptr_t pid, int action) { return _cwait(status, pid, action); }
|
2003-03-22 22:15:41 +01:00
|
|
|
static inline int getpid(void) { return _getpid(); }
|
2013-04-09 13:45:48 +02:00
|
|
|
static inline intptr_t execv(const char* name, const char* const* argv) { return _execv(name, argv); }
|
|
|
|
static inline intptr_t execve(const char* name, const char* const* argv, const char* const* envv) { return _execve(name, argv, envv); }
|
|
|
|
static inline intptr_t execvp(const char* name, const char* const* argv) { return _execvp(name, argv); }
|
|
|
|
static inline intptr_t execvpe(const char* name, const char* const* argv, const char* const* envv) { return _execvpe(name, argv, envv); }
|
2005-11-03 14:17:51 +01:00
|
|
|
static inline intptr_t spawnv(int flags, const char* name, const char* const* argv) { return _spawnv(flags, name, argv); }
|
|
|
|
static inline intptr_t spawnve(int flags, const char* name, const char* const* argv, const char* const* envv) { return _spawnve(flags, name, argv, envv); }
|
|
|
|
static inline intptr_t spawnvp(int flags, const char* name, const char* const* argv) { return _spawnvp(flags, name, argv); }
|
|
|
|
static inline intptr_t spawnvpe(int flags, const char* name, const char* const* argv, const char* const* envv) { return _spawnvpe(flags, name, argv, envv); }
|
2003-03-26 02:29:56 +01:00
|
|
|
|
2005-04-25 12:48:59 +02:00
|
|
|
#if defined(__GNUC__) && (__GNUC__ < 4)
|
2017-11-02 10:19:18 +01:00
|
|
|
extern intptr_t WINAPIV execl(const char*,const char*,...) __attribute__((alias("_execl")));
|
|
|
|
extern intptr_t WINAPIV execle(const char*,const char*,...) __attribute__((alias("_execle")));
|
|
|
|
extern intptr_t WINAPIV execlp(const char*,const char*,...) __attribute__((alias("_execlp")));
|
|
|
|
extern intptr_t WINAPIV execlpe(const char*,const char*,...) __attribute__((alias("_execlpe")));
|
|
|
|
extern intptr_t WINAPIV spawnl(int,const char*,const char*,...) __attribute__((alias("_spawnl")));
|
|
|
|
extern intptr_t WINAPIV spawnle(int,const char*,const char*,...) __attribute__((alias("_spawnle")));
|
|
|
|
extern intptr_t WINAPIV spawnlp(int,const char*,const char*,...) __attribute__((alias("_spawnlp")));
|
|
|
|
extern intptr_t WINAPIV spawnlpe(int,const char*,const char*,...) __attribute__((alias("_spawnlpe")));
|
2003-03-26 02:29:56 +01:00
|
|
|
#else
|
|
|
|
#define execl _execl
|
|
|
|
#define execle _execle
|
|
|
|
#define execlp _execlp
|
|
|
|
#define execlpe _execlpe
|
|
|
|
#define spawnl _spawnl
|
|
|
|
#define spawnle _spawnle
|
|
|
|
#define spawnlp _spawnlp
|
|
|
|
#define spawnlpe _spawnlpe
|
|
|
|
#endif /* __GNUC__ */
|
|
|
|
|
2001-04-11 01:21:43 +02:00
|
|
|
#endif /* __WINE_PROCESS_H */
|