Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

144 lines
3.8 KiB

  1. /***
  2. *process.h - definition and declarations for process control functions
  3. *
  4. * Copyright (c) 1985-1992, 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. #ifndef _INC_PROCESS
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #if (_MSC_VER <= 600)
  16. #define __cdecl _cdecl
  17. #define __far _far
  18. #define __near _near
  19. #endif
  20. /* mode values for spawnxx routines
  21. * (only P_WAIT and P_OVERLAY are supported on MS-DOS)
  22. */
  23. #ifndef _MT
  24. extern int __near __cdecl _p_overlay;
  25. #endif
  26. #define _P_WAIT 0
  27. #define _P_NOWAIT 1
  28. #ifdef _MT
  29. #define _P_OVERLAY 2
  30. #else
  31. #define _P_OVERLAY _p_overlay
  32. #endif
  33. #define _OLD_P_OVERLAY 2
  34. #define _P_NOWAITO 3
  35. #define _P_DETACH 4
  36. /* function prototypes */
  37. #ifdef _MT
  38. int __cdecl _beginthread(void(__cdecl *)(void *),
  39. void *, unsigned, void *);
  40. void __cdecl _endthread(void);
  41. #endif
  42. void __cdecl abort(void);
  43. void __cdecl _cexit(void);
  44. void __cdecl _c_exit(void);
  45. #ifndef _WINDOWS
  46. int __cdecl _execl(const char *, const char *, ...);
  47. int __cdecl _execle(const char *, const char *, ...);
  48. int __cdecl _execlp(const char *, const char *, ...);
  49. int __cdecl _execlpe(const char *, const char *, ...);
  50. int __cdecl _execv(const char *,
  51. const char * const *);
  52. int __cdecl _execve(const char *,
  53. const char * const *, const char * const *);
  54. int __cdecl _execvp(const char *,
  55. const char * const *);
  56. int __cdecl _execvpe(const char *,
  57. const char * const *, const char * const *);
  58. #endif
  59. #ifndef _WINDLL
  60. void __cdecl exit(int);
  61. void __cdecl _exit(int);
  62. #endif
  63. int __cdecl _getpid(void);
  64. #ifndef _WINDOWS
  65. int __cdecl _spawnl(int, const char *, const char *,
  66. ...);
  67. int __cdecl _spawnle(int, const char *, const char *,
  68. ...);
  69. int __cdecl _spawnlp(int, const char *, const char *,
  70. ...);
  71. int __cdecl _spawnlpe(int, const char *, const char *,
  72. ...);
  73. int __cdecl _spawnv(int, const char *,
  74. const char * const *);
  75. int __cdecl _spawnve(int, const char *,
  76. const char * const *, const char * const *);
  77. int __cdecl _spawnvp(int, const char *,
  78. const char * const *);
  79. int __cdecl _spawnvpe(int, const char *,
  80. const char * const *, const char * const *);
  81. int __cdecl system(const char *);
  82. #endif
  83. #ifndef __STDC__
  84. /* Non-ANSI names for compatibility */
  85. #define P_WAIT _P_WAIT
  86. #define P_NOWAIT _P_NOWAIT
  87. #define P_OVERLAY _P_OVERLAY
  88. #define OLD_P_OVERLAY _OLD_P_OVERLAY
  89. #define P_NOWAITO _P_NOWAITO
  90. #define P_DETACH _P_DETACH
  91. #ifndef _WINDOWS
  92. int __cdecl execl(const char *, const char *, ...);
  93. int __cdecl execle(const char *, const char *, ...);
  94. int __cdecl execlp(const char *, const char *, ...);
  95. int __cdecl execlpe(const char *, const char *, ...);
  96. int __cdecl execv(const char *,
  97. const char * const *);
  98. int __cdecl execve(const char *,
  99. const char * const *, const char * const *);
  100. int __cdecl execvp(const char *,
  101. const char * const *);
  102. int __cdecl execvpe(const char *,
  103. const char * const *, const char * const *);
  104. #endif
  105. int __cdecl getpid(void);
  106. #ifndef _WINDOWS
  107. int __cdecl spawnl(int, const char *, const char *,
  108. ...);
  109. int __cdecl spawnle(int, const char *, const char *,
  110. ...);
  111. int __cdecl spawnlp(int, const char *, const char *,
  112. ...);
  113. int __cdecl spawnlpe(int, const char *, const char *,
  114. ...);
  115. int __cdecl spawnv(int, const char *,
  116. const char * const *);
  117. int __cdecl spawnve(int, const char *,
  118. const char * const *, const char * const *);
  119. int __cdecl spawnvp(int, const char *,
  120. const char * const *);
  121. int __cdecl spawnvpe(int, const char *,
  122. const char * const *, const char * const *);
  123. #endif
  124. #endif
  125. #ifdef __cplusplus
  126. }
  127. #endif
  128. #define _INC_PROCESS
  129. #endif