home *** CD-ROM | disk | FTP | other *** search
- /***
- *process.h - definition and declarations for process control functions
- *
- * Copyright (c) 1985-1991, Microsoft Corporation. All rights reserved.
- *
- *Purpose:
- * This file contains the declarations and definitions for the
- * spawnxx, execxx, and various other process control routines.
- *
- ****/
-
- #ifndef _INC_PROCESS
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if defined(_DLL) && !defined(_MT)
- #error Cannot define _DLL without _MT
- #endif
-
- #ifdef _MT
- #define _FAR_ __far
- #else
- #define _FAR_
- #endif
-
- #if (_MSC_VER <= 600)
- #define __cdecl _cdecl
- #define __far _far
- #define __loadds _loadds
- #define __near _near
- #endif
-
- /* mode values for spawnxx routines
- * (only P_WAIT and P_OVERLAY are supported on MS-DOS)
- */
-
- #ifndef _MT
- extern int __near __cdecl _p_overlay;
- #endif
-
- #define _P_WAIT 0
- #define _P_NOWAIT 1
- #ifdef _MT
- #define _P_OVERLAY 2
- #else
- #define _P_OVERLAY _p_overlay
- #endif
- #define _OLD_P_OVERLAY 2
- #define _P_NOWAITO 3
- #define _P_DETACH 4
-
-
- /* action codes used with cwait() */
-
- #define _WAIT_CHILD 0
- #define _WAIT_GRANDCHILD 1
-
-
- /* function prototypes */
-
- #ifdef _MT
- int _FAR_ __cdecl _beginthread(void(__cdecl _FAR_ *)(void _FAR_ *),
- void _FAR_ *, unsigned, void _FAR_ *);
- void _FAR_ __cdecl _endthread(void);
- #endif
- void _FAR_ __cdecl abort(void);
- void _FAR_ __cdecl _cexit(void);
- void _FAR_ __cdecl _c_exit(void);
- #ifndef _WINDOWS
- int _FAR_ __cdecl _cwait(int _FAR_ *, int, int);
- int _FAR_ __cdecl _execl(const char _FAR_ *, const char _FAR_ *, ...);
- int _FAR_ __cdecl _execle(const char _FAR_ *, const char _FAR_ *, ...);
- int _FAR_ __cdecl _execlp(const char _FAR_ *, const char _FAR_ *, ...);
- int _FAR_ __cdecl _execlpe(const char _FAR_ *, const char _FAR_ *, ...);
- int _FAR_ __cdecl _execv(const char _FAR_ *,
- const char _FAR_ * const _FAR_ *);
- int _FAR_ __cdecl _execve(const char _FAR_ *,
- const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
- int _FAR_ __cdecl _execvp(const char _FAR_ *,
- const char _FAR_ * const _FAR_ *);
- int _FAR_ __cdecl _execvpe(const char _FAR_ *,
- const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
- #endif
- #ifndef _WINDLL
- void _FAR_ __cdecl exit(int);
- void _FAR_ __cdecl _exit(int);
- #endif
- int _FAR_ __cdecl _getpid(void);
- #ifndef _WINDOWS
- int _FAR_ __cdecl _spawnl(int, const char _FAR_ *, const char _FAR_ *,
- ...);
- int _FAR_ __cdecl _spawnle(int, const char _FAR_ *, const char _FAR_ *,
- ...);
- int _FAR_ __cdecl _spawnlp(int, const char _FAR_ *, const char _FAR_ *,
- ...);
- int _FAR_ __cdecl _spawnlpe(int, const char _FAR_ *, const char _FAR_ *,
- ...);
- int _FAR_ __cdecl _spawnv(int, const char _FAR_ *,
- const char _FAR_ * const _FAR_ *);
- int _FAR_ __cdecl _spawnve(int, const char _FAR_ *,
- const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
- int _FAR_ __cdecl _spawnvp(int, const char _FAR_ *,
- const char _FAR_ * const _FAR_ *);
- int _FAR_ __cdecl _spawnvpe(int, const char _FAR_ *,
- const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
- int _FAR_ __cdecl system(const char _FAR_ *);
- int _FAR_ __cdecl _wait(int _FAR_ *);
- #endif
-
- #ifndef __STDC__
- /* Non-ANSI names for compatibility */
-
- #define P_WAIT _P_WAIT
- #define P_NOWAIT _P_NOWAIT
- #define P_OVERLAY _P_OVERLAY
- #define OLD_P_OVERLAY _OLD_P_OVERLAY
- #define P_NOWAITO _P_NOWAITO
- #define P_DETACH _P_DETACH
-
- #define WAIT_CHILD _WAIT_CHILD
- #define WAIT_GRANDCHILD _WAIT_GRANDCHILD
-
- #ifndef _WINDOWS
- int _FAR_ __cdecl cwait(int _FAR_ *, int, int);
- int _FAR_ __cdecl execl(const char _FAR_ *, const char _FAR_ *, ...);
- int _FAR_ __cdecl execle(const char _FAR_ *, const char _FAR_ *, ...);
- int _FAR_ __cdecl execlp(const char _FAR_ *, const char _FAR_ *, ...);
- int _FAR_ __cdecl execlpe(const char _FAR_ *, const char _FAR_ *, ...);
- int _FAR_ __cdecl execv(const char _FAR_ *,
- const char _FAR_ * const _FAR_ *);
- int _FAR_ __cdecl execve(const char _FAR_ *,
- const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
- int _FAR_ __cdecl execvp(const char _FAR_ *,
- const char _FAR_ * const _FAR_ *);
- int _FAR_ __cdecl execvpe(const char _FAR_ *,
- const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
- #endif
- int _FAR_ __cdecl getpid(void);
- #ifndef _WINDOWS
- int _FAR_ __cdecl spawnl(int, const char _FAR_ *, const char _FAR_ *,
- ...);
- int _FAR_ __cdecl spawnle(int, const char _FAR_ *, const char _FAR_ *,
- ...);
- int _FAR_ __cdecl spawnlp(int, const char _FAR_ *, const char _FAR_ *,
- ...);
- int _FAR_ __cdecl spawnlpe(int, const char _FAR_ *, const char _FAR_ *,
- ...);
- int _FAR_ __cdecl spawnv(int, const char _FAR_ *,
- const char _FAR_ * const _FAR_ *);
- int _FAR_ __cdecl spawnve(int, const char _FAR_ *,
- const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
- int _FAR_ __cdecl spawnvp(int, const char _FAR_ *,
- const char _FAR_ * const _FAR_ *);
- int _FAR_ __cdecl spawnvpe(int, const char _FAR_ *,
- const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
- int _FAR_ __cdecl wait(int _FAR_ *);
- #endif
-
- #endif /* __STDC__ */
-
- #ifdef __cplusplus
- }
- #endif
-
- #define _INC_PROCESS
- #endif /* _INC_PROCESS */
-