2001-04-10 23:21:43 +00: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
|
|
|
|
|
2020-02-27 10:59:02 +00:00
|
|
|
#include <corecrt_startup.h>
|
2020-03-09 16:53:23 +00:00
|
|
|
#include <corecrt_wprocess.h>
|
2001-04-10 23:21:43 +00: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 17:43:00 +00:00
|
|
|
typedef void (__cdecl *_beginthread_start_routine_t)(void *);
|
2002-02-02 18:42:11 +00:00
|
|
|
typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *);
|
2001-06-19 03:46:27 +00:00
|
|
|
|
2020-11-24 17:50:06 +00:00
|
|
|
_ACRTIMP uintptr_t __cdecl _beginthread(_beginthread_start_routine_t,unsigned int,void*);
|
|
|
|
_ACRTIMP uintptr_t __cdecl _beginthreadex(void*,unsigned int,_beginthreadex_start_routine_t,void*,unsigned int,unsigned int*);
|
|
|
|
_ACRTIMP intptr_t __cdecl _cwait(int*,intptr_t,int);
|
2020-04-15 16:27:22 +00:00
|
|
|
_ACRTIMP DECLSPEC_NORETURN void __cdecl _endthread(void);
|
|
|
|
_ACRTIMP DECLSPEC_NORETURN void __cdecl _endthreadex(unsigned int);
|
2020-11-24 17:50:06 +00:00
|
|
|
_ACRTIMP intptr_t WINAPIV _execl(const char*,const char*,...);
|
|
|
|
_ACRTIMP intptr_t WINAPIV _execle(const char*,const char*,...);
|
|
|
|
_ACRTIMP intptr_t WINAPIV _execlp(const char*,const char*,...);
|
|
|
|
_ACRTIMP intptr_t WINAPIV _execlpe(const char*,const char*,...);
|
|
|
|
_ACRTIMP intptr_t __cdecl _execv(const char*,const char* const *);
|
|
|
|
_ACRTIMP intptr_t __cdecl _execve(const char*,const char* const *,const char* const *);
|
|
|
|
_ACRTIMP intptr_t __cdecl _execvp(const char*,const char* const *);
|
|
|
|
_ACRTIMP intptr_t __cdecl _execvpe(const char*,const char* const *,const char* const *);
|
|
|
|
_ACRTIMP int __cdecl _getpid(void);
|
|
|
|
_ACRTIMP intptr_t WINAPIV _spawnl(int,const char*,const char*,...);
|
|
|
|
_ACRTIMP intptr_t WINAPIV _spawnle(int,const char*,const char*,...);
|
|
|
|
_ACRTIMP intptr_t WINAPIV _spawnlp(int,const char*,const char*,...);
|
|
|
|
_ACRTIMP intptr_t WINAPIV _spawnlpe(int,const char*,const char*,...);
|
|
|
|
_ACRTIMP intptr_t __cdecl _spawnv(int,const char*,const char* const *);
|
|
|
|
_ACRTIMP intptr_t __cdecl _spawnve(int,const char*,const char* const *,const char* const *);
|
|
|
|
_ACRTIMP intptr_t __cdecl _spawnvp(int,const char*,const char* const *);
|
|
|
|
_ACRTIMP intptr_t __cdecl _spawnvpe(int,const char*,const char* const *,const char* const *);
|
2001-04-10 23:21:43 +00:00
|
|
|
|
2020-11-24 17:50:06 +00:00
|
|
|
_ACRTIMP void __cdecl _c_exit(void);
|
|
|
|
_ACRTIMP void __cdecl _cexit(void);
|
2020-04-15 16:27:22 +00:00
|
|
|
_ACRTIMP DECLSPEC_NORETURN void __cdecl _exit(int);
|
|
|
|
_ACRTIMP DECLSPEC_NORETURN void __cdecl abort(void);
|
|
|
|
_ACRTIMP DECLSPEC_NORETURN void __cdecl exit(int);
|
2020-03-19 14:41:48 +00:00
|
|
|
_ACRTIMP DECLSPEC_NORETURN void __cdecl quick_exit(int);
|
2020-11-24 17:50:06 +00:00
|
|
|
_ACRTIMP int __cdecl system(const char*);
|
2004-06-25 01:19:15 +00:00
|
|
|
|
2001-04-10 23:21:43 +00: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 13:17:51 +00:00
|
|
|
static inline intptr_t cwait(int *status, intptr_t pid, int action) { return _cwait(status, pid, action); }
|
2003-03-22 21:15:41 +00:00
|
|
|
static inline int getpid(void) { return _getpid(); }
|
2005-11-03 13:17:51 +00: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); }
|
2019-04-22 10:46:58 +00:00
|
|
|
#define execv _execv
|
|
|
|
#define execve _execve
|
|
|
|
#define execvp _execvp
|
|
|
|
#define execvpe _execvpe
|
2003-03-26 01:29:56 +00:00
|
|
|
|
2005-04-25 10:48:59 +00:00
|
|
|
#if defined(__GNUC__) && (__GNUC__ < 4)
|
2020-11-24 17:50:06 +00:00
|
|
|
_ACRTIMP intptr_t WINAPIV execl(const char*,const char*,...) __attribute__((alias("_execl")));
|
|
|
|
_ACRTIMP intptr_t WINAPIV execle(const char*,const char*,...) __attribute__((alias("_execle")));
|
|
|
|
_ACRTIMP intptr_t WINAPIV execlp(const char*,const char*,...) __attribute__((alias("_execlp")));
|
|
|
|
_ACRTIMP intptr_t WINAPIV execlpe(const char*,const char*,...) __attribute__((alias("_execlpe")));
|
|
|
|
_ACRTIMP intptr_t WINAPIV spawnl(int,const char*,const char*,...) __attribute__((alias("_spawnl")));
|
|
|
|
_ACRTIMP intptr_t WINAPIV spawnle(int,const char*,const char*,...) __attribute__((alias("_spawnle")));
|
|
|
|
_ACRTIMP intptr_t WINAPIV spawnlp(int,const char*,const char*,...) __attribute__((alias("_spawnlp")));
|
|
|
|
_ACRTIMP intptr_t WINAPIV spawnlpe(int,const char*,const char*,...) __attribute__((alias("_spawnlpe")));
|
2003-03-26 01:29:56 +00: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-10 23:21:43 +00:00
|
|
|
#endif /* __WINE_PROCESS_H */
|