home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c045 / 2.ddi / INCLUDE / PROCESS.H$ / PROCESS.bin
Encoding:
Text File  |  1992-01-01  |  5.1 KB  |  169 lines

  1. /***
  2. *process.h - definition and declarations for process control functions
  3. *
  4. *    Copyright (c) 1985-1991, Microsoft Corporation.  All rights reserved.
  5. *
  6. *Purpose:
  7. *    This file contains the declarations and definitions for the
  8. *    spawnxx, execxx, and various other process control routines.
  9. *
  10. ****/
  11.  
  12. #ifndef _INC_PROCESS
  13.  
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17.  
  18. #if defined(_DLL) && !defined(_MT)
  19. #error Cannot define _DLL without _MT
  20. #endif
  21.  
  22. #ifdef _MT
  23. #define _FAR_ __far
  24. #else
  25. #define _FAR_
  26. #endif
  27.  
  28. #if (_MSC_VER <= 600)
  29. #define __cdecl     _cdecl
  30. #define __far       _far
  31. #define __loadds    _loadds
  32. #define __near      _near
  33. #endif
  34.  
  35. /* mode values for spawnxx routines
  36.  * (only P_WAIT and P_OVERLAY are supported on MS-DOS)
  37.  */
  38.  
  39. #ifndef _MT
  40. extern int __near __cdecl _p_overlay;
  41. #endif
  42.  
  43. #define _P_WAIT     0
  44. #define _P_NOWAIT    1
  45. #ifdef _MT
  46. #define _P_OVERLAY    2
  47. #else
  48. #define _P_OVERLAY    _p_overlay
  49. #endif
  50. #define _OLD_P_OVERLAY    2
  51. #define _P_NOWAITO    3
  52. #define _P_DETACH    4
  53.  
  54.  
  55. /* action codes used with cwait() */
  56.  
  57. #define _WAIT_CHILD     0
  58. #define _WAIT_GRANDCHILD 1
  59.  
  60.  
  61. /* function prototypes */
  62.  
  63. #ifdef _MT
  64. int _FAR_ __cdecl _beginthread(void(__cdecl _FAR_ *)(void _FAR_ *),
  65.     void _FAR_ *, unsigned, void _FAR_ *);
  66. void _FAR_ __cdecl _endthread(void);
  67. #endif
  68. void _FAR_ __cdecl abort(void);
  69. void _FAR_ __cdecl _cexit(void);
  70. void _FAR_ __cdecl _c_exit(void);
  71. #ifndef _WINDOWS
  72. int _FAR_ __cdecl _cwait(int _FAR_ *, int, int);
  73. int _FAR_ __cdecl _execl(const char _FAR_ *, const char _FAR_ *, ...);
  74. int _FAR_ __cdecl _execle(const char _FAR_ *, const char _FAR_ *, ...);
  75. int _FAR_ __cdecl _execlp(const char _FAR_ *, const char _FAR_ *, ...);
  76. int _FAR_ __cdecl _execlpe(const char _FAR_ *, const char _FAR_ *, ...);
  77. int _FAR_ __cdecl _execv(const char _FAR_ *,
  78.     const char _FAR_ * const _FAR_ *);
  79. int _FAR_ __cdecl _execve(const char _FAR_ *,
  80.     const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
  81. int _FAR_ __cdecl _execvp(const char _FAR_ *,
  82.     const char _FAR_ * const _FAR_ *);
  83. int _FAR_ __cdecl _execvpe(const char _FAR_ *,
  84.     const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
  85. #endif
  86. #ifndef _WINDLL
  87. void _FAR_ __cdecl exit(int);
  88. void _FAR_ __cdecl _exit(int);
  89. #endif
  90. int _FAR_ __cdecl _getpid(void);
  91. #ifndef _WINDOWS
  92. int _FAR_ __cdecl _spawnl(int, const char _FAR_ *, const char _FAR_ *,
  93.     ...);
  94. int _FAR_ __cdecl _spawnle(int, const char _FAR_ *, const char _FAR_ *,
  95.     ...);
  96. int _FAR_ __cdecl _spawnlp(int, const char _FAR_ *, const char _FAR_ *,
  97.     ...);
  98. int _FAR_ __cdecl _spawnlpe(int, const char _FAR_ *, const char _FAR_ *,
  99.     ...);
  100. int _FAR_ __cdecl _spawnv(int, const char _FAR_ *,
  101.     const char _FAR_ * const _FAR_ *);
  102. int _FAR_ __cdecl _spawnve(int, const char _FAR_ *,
  103.     const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
  104. int _FAR_ __cdecl _spawnvp(int, const char _FAR_ *,
  105.     const char _FAR_ * const _FAR_ *);
  106. int _FAR_ __cdecl _spawnvpe(int, const char _FAR_ *,
  107.     const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
  108. int _FAR_ __cdecl system(const char _FAR_ *);
  109. int _FAR_ __cdecl _wait(int _FAR_ *);
  110. #endif
  111.  
  112. #ifndef __STDC__
  113. /* Non-ANSI names for compatibility */
  114.  
  115. #define P_WAIT        _P_WAIT
  116. #define P_NOWAIT    _P_NOWAIT
  117. #define P_OVERLAY    _P_OVERLAY
  118. #define OLD_P_OVERLAY    _OLD_P_OVERLAY
  119. #define P_NOWAITO    _P_NOWAITO
  120. #define P_DETACH    _P_DETACH
  121.  
  122. #define WAIT_CHILD    _WAIT_CHILD
  123. #define WAIT_GRANDCHILD _WAIT_GRANDCHILD
  124.  
  125. #ifndef _WINDOWS
  126. int _FAR_ __cdecl cwait(int _FAR_ *, int, int);
  127. int _FAR_ __cdecl execl(const char _FAR_ *, const char _FAR_ *, ...);
  128. int _FAR_ __cdecl execle(const char _FAR_ *, const char _FAR_ *, ...);
  129. int _FAR_ __cdecl execlp(const char _FAR_ *, const char _FAR_ *, ...);
  130. int _FAR_ __cdecl execlpe(const char _FAR_ *, const char _FAR_ *, ...);
  131. int _FAR_ __cdecl execv(const char _FAR_ *,
  132.     const char _FAR_ * const _FAR_ *);
  133. int _FAR_ __cdecl execve(const char _FAR_ *,
  134.     const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
  135. int _FAR_ __cdecl execvp(const char _FAR_ *,
  136.     const char _FAR_ * const _FAR_ *);
  137. int _FAR_ __cdecl execvpe(const char _FAR_ *,
  138.     const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
  139. #endif
  140. int _FAR_ __cdecl getpid(void);
  141. #ifndef _WINDOWS
  142. int _FAR_ __cdecl spawnl(int, const char _FAR_ *, const char _FAR_ *,
  143.     ...);
  144. int _FAR_ __cdecl spawnle(int, const char _FAR_ *, const char _FAR_ *,
  145.     ...);
  146. int _FAR_ __cdecl spawnlp(int, const char _FAR_ *, const char _FAR_ *,
  147.     ...);
  148. int _FAR_ __cdecl spawnlpe(int, const char _FAR_ *, const char _FAR_ *,
  149.     ...);
  150. int _FAR_ __cdecl spawnv(int, const char _FAR_ *,
  151.     const char _FAR_ * const _FAR_ *);
  152. int _FAR_ __cdecl spawnve(int, const char _FAR_ *,
  153.     const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
  154. int _FAR_ __cdecl spawnvp(int, const char _FAR_ *,
  155.     const char _FAR_ * const _FAR_ *);
  156. int _FAR_ __cdecl spawnvpe(int, const char _FAR_ *,
  157.     const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
  158. int _FAR_ __cdecl wait(int _FAR_ *);
  159. #endif
  160.  
  161. #endif    /* __STDC__ */
  162.  
  163. #ifdef __cplusplus
  164. }
  165. #endif
  166.  
  167. #define _INC_PROCESS
  168. #endif    /* _INC_PROCESS */
  169.