Process.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
  3. #ifndef cmsys_Process_h
  4. #define cmsys_Process_h
  5. #include <cmsys/Configure.h>
  6. /* Redefine all public interface symbol names to be in the proper
  7. namespace. These macros are used internally to kwsys only, and are
  8. not visible to user code. Use kwsysHeaderDump.pl to reproduce
  9. these macros after making changes to the interface. */
  10. #if !defined(KWSYS_NAMESPACE)
  11. #define kwsys_ns(x) cmsys##x
  12. #define kwsysEXPORT cmsys_EXPORT
  13. #endif
  14. #if !cmsys_NAME_IS_KWSYS
  15. #define kwsysProcess kwsys_ns(Process)
  16. #define kwsysProcess_s kwsys_ns(Process_s)
  17. #define kwsysProcess_New kwsys_ns(Process_New)
  18. #define kwsysProcess_Delete kwsys_ns(Process_Delete)
  19. #define kwsysProcess_SetCommand kwsys_ns(Process_SetCommand)
  20. #define kwsysProcess_AddCommand kwsys_ns(Process_AddCommand)
  21. #define kwsysProcess_SetTimeout kwsys_ns(Process_SetTimeout)
  22. #define kwsysProcess_SetWorkingDirectory kwsys_ns(Process_SetWorkingDirectory)
  23. #define kwsysProcess_SetPipeFile kwsys_ns(Process_SetPipeFile)
  24. #define kwsysProcess_SetPipeNative kwsys_ns(Process_SetPipeNative)
  25. #define kwsysProcess_SetPipeShared kwsys_ns(Process_SetPipeShared)
  26. #define kwsysProcess_Option_Detach kwsys_ns(Process_Option_Detach)
  27. #define kwsysProcess_Option_HideWindow kwsys_ns(Process_Option_HideWindow)
  28. #define kwsysProcess_Option_MergeOutput kwsys_ns(Process_Option_MergeOutput)
  29. #define kwsysProcess_Option_Verbatim kwsys_ns(Process_Option_Verbatim)
  30. #define kwsysProcess_Option_CreateProcessGroup \
  31. kwsys_ns(Process_Option_CreateProcessGroup)
  32. #define kwsysProcess_GetOption kwsys_ns(Process_GetOption)
  33. #define kwsysProcess_SetOption kwsys_ns(Process_SetOption)
  34. #define kwsysProcess_Option_e kwsys_ns(Process_Option_e)
  35. #define kwsysProcess_State_Starting kwsys_ns(Process_State_Starting)
  36. #define kwsysProcess_State_Error kwsys_ns(Process_State_Error)
  37. #define kwsysProcess_State_Exception kwsys_ns(Process_State_Exception)
  38. #define kwsysProcess_State_Executing kwsys_ns(Process_State_Executing)
  39. #define kwsysProcess_State_Exited kwsys_ns(Process_State_Exited)
  40. #define kwsysProcess_State_Expired kwsys_ns(Process_State_Expired)
  41. #define kwsysProcess_State_Killed kwsys_ns(Process_State_Killed)
  42. #define kwsysProcess_State_Disowned kwsys_ns(Process_State_Disowned)
  43. #define kwsysProcess_State_e kwsys_ns(Process_State_e)
  44. #define kwsysProcess_Exception_None kwsys_ns(Process_Exception_None)
  45. #define kwsysProcess_Exception_Fault kwsys_ns(Process_Exception_Fault)
  46. #define kwsysProcess_Exception_Illegal kwsys_ns(Process_Exception_Illegal)
  47. #define kwsysProcess_Exception_Interrupt kwsys_ns(Process_Exception_Interrupt)
  48. #define kwsysProcess_Exception_Numerical kwsys_ns(Process_Exception_Numerical)
  49. #define kwsysProcess_Exception_Other kwsys_ns(Process_Exception_Other)
  50. #define kwsysProcess_Exception_e kwsys_ns(Process_Exception_e)
  51. #define kwsysProcess_GetState kwsys_ns(Process_GetState)
  52. #define kwsysProcess_GetExitException kwsys_ns(Process_GetExitException)
  53. #define kwsysProcess_GetExitCode kwsys_ns(Process_GetExitCode)
  54. #define kwsysProcess_GetExitValue kwsys_ns(Process_GetExitValue)
  55. #define kwsysProcess_GetErrorString kwsys_ns(Process_GetErrorString)
  56. #define kwsysProcess_GetExceptionString kwsys_ns(Process_GetExceptionString)
  57. #define kwsysProcess_GetStateByIndex kwsys_ns(Process_GetStateByIndex)
  58. #define kwsysProcess_GetExitExceptionByIndex \
  59. kwsys_ns(Process_GetExitExceptionByIndex)
  60. #define kwsysProcess_GetExitCodeByIndex kwsys_ns(Process_GetExitCodeByIndex)
  61. #define kwsysProcess_GetExitValueByIndex kwsys_ns(Process_GetExitValueByIndex)
  62. #define kwsysProcess_GetExceptionStringByIndex \
  63. kwsys_ns(Process_GetExceptionStringByIndex)
  64. #define kwsysProcess_GetExitCodeByIndex kwsys_ns(Process_GetExitCodeByIndex)
  65. #define kwsysProcess_Execute kwsys_ns(Process_Execute)
  66. #define kwsysProcess_Disown kwsys_ns(Process_Disown)
  67. #define kwsysProcess_WaitForData kwsys_ns(Process_WaitForData)
  68. #define kwsysProcess_Pipes_e kwsys_ns(Process_Pipes_e)
  69. #define kwsysProcess_Pipe_None kwsys_ns(Process_Pipe_None)
  70. #define kwsysProcess_Pipe_STDIN kwsys_ns(Process_Pipe_STDIN)
  71. #define kwsysProcess_Pipe_STDOUT kwsys_ns(Process_Pipe_STDOUT)
  72. #define kwsysProcess_Pipe_STDERR kwsys_ns(Process_Pipe_STDERR)
  73. #define kwsysProcess_Pipe_Timeout kwsys_ns(Process_Pipe_Timeout)
  74. #define kwsysProcess_Pipe_Handle kwsys_ns(Process_Pipe_Handle)
  75. #define kwsysProcess_WaitForExit kwsys_ns(Process_WaitForExit)
  76. #define kwsysProcess_Interrupt kwsys_ns(Process_Interrupt)
  77. #define kwsysProcess_Kill kwsys_ns(Process_Kill)
  78. #define kwsysProcess_KillPID kwsys_ns(Process_KillPID)
  79. #define kwsysProcess_ResetStartTime kwsys_ns(Process_ResetStartTime)
  80. #endif
  81. #if defined(__cplusplus)
  82. extern "C" {
  83. #endif
  84. /**
  85. * Process control data structure.
  86. */
  87. typedef struct kwsysProcess_s kwsysProcess;
  88. /* Platform-specific pipe handle type. */
  89. #if defined(_WIN32) && !defined(__CYGWIN__)
  90. typedef void* kwsysProcess_Pipe_Handle;
  91. #else
  92. typedef int kwsysProcess_Pipe_Handle;
  93. #endif
  94. /**
  95. * Create a new Process instance.
  96. */
  97. kwsysEXPORT kwsysProcess* kwsysProcess_New(void);
  98. /**
  99. * Delete an existing Process instance. If the instance is currently
  100. * executing a process, this blocks until the process terminates.
  101. */
  102. kwsysEXPORT void kwsysProcess_Delete(kwsysProcess* cp);
  103. /**
  104. * Set the command line to be executed. Argument is an array of
  105. * pointers to the command and each argument. The array must end with
  106. * a NULL pointer. Any previous command lines are removed. Returns
  107. * 1 for success and 0 otherwise.
  108. */
  109. kwsysEXPORT int kwsysProcess_SetCommand(kwsysProcess* cp,
  110. char const* const* command);
  111. /**
  112. * Add a command line to be executed. Argument is an array of
  113. * pointers to the command and each argument. The array must end with
  114. * a NULL pointer. If this is not the first command added, its
  115. * standard input will be connected to the standard output of the
  116. * previous command. Returns 1 for success and 0 otherwise.
  117. */
  118. kwsysEXPORT int kwsysProcess_AddCommand(kwsysProcess* cp,
  119. char const* const* command);
  120. /**
  121. * Set the timeout in seconds for the child process. The timeout
  122. * period begins when the child is executed. If the child has not
  123. * terminated when the timeout expires, it will be killed. A
  124. * non-positive (<= 0) value will disable the timeout.
  125. */
  126. kwsysEXPORT void kwsysProcess_SetTimeout(kwsysProcess* cp, double timeout);
  127. /**
  128. * Set the working directory for the child process. The working
  129. * directory can be absolute or relative to the current directory.
  130. * Returns 1 for success and 0 for failure.
  131. */
  132. kwsysEXPORT int kwsysProcess_SetWorkingDirectory(kwsysProcess* cp,
  133. const char* dir);
  134. /**
  135. * Set the name of a file to be attached to the given pipe. Returns 1
  136. * for success and 0 for failure.
  137. */
  138. kwsysEXPORT int kwsysProcess_SetPipeFile(kwsysProcess* cp, int pipe,
  139. const char* file);
  140. /**
  141. * Set whether the given pipe in the child is shared with the parent
  142. * process. The default is no for Pipe_STDOUT and Pipe_STDERR and yes
  143. * for Pipe_STDIN.
  144. */
  145. kwsysEXPORT void kwsysProcess_SetPipeShared(kwsysProcess* cp, int pipe,
  146. int shared);
  147. /**
  148. * Specify a platform-specific native pipe for use as one of the child
  149. * interface pipes. The native pipe is specified by an array of two
  150. * descriptors or handles. The first entry in the array (index 0)
  151. * should be the read end of the pipe. The second entry in the array
  152. * (index 1) should be the write end of the pipe. If a null pointer
  153. * is given the option will be disabled.
  154. *
  155. * For Pipe_STDIN the native pipe is connected to the first child in
  156. * the pipeline as its stdin. After the children are created the
  157. * write end of the pipe will be closed in the child process and the
  158. * read end will be closed in the parent process.
  159. *
  160. * For Pipe_STDOUT and Pipe_STDERR the pipe is connected to the last
  161. * child as its stdout or stderr. After the children are created the
  162. * write end of the pipe will be closed in the parent process and the
  163. * read end will be closed in the child process.
  164. */
  165. kwsysEXPORT void kwsysProcess_SetPipeNative(kwsysProcess* cp, int pipe,
  166. kwsysProcess_Pipe_Handle p[2]);
  167. /**
  168. * Get/Set a possibly platform-specific option. Possible options are:
  169. *
  170. * kwsysProcess_Option_Detach = Whether to detach the process.
  171. * 0 = No (default)
  172. * 1 = Yes
  173. *
  174. * kwsysProcess_Option_HideWindow = Whether to hide window on Windows.
  175. * 0 = No (default)
  176. * 1 = Yes
  177. *
  178. * kwsysProcess_Option_MergeOutput = Whether to merge stdout/stderr.
  179. * No content will be returned as stderr.
  180. * Any actual stderr will be on stdout.
  181. * 0 = No (default)
  182. * 1 = Yes
  183. *
  184. * kwsysProcess_Option_Verbatim = Whether SetCommand and AddCommand
  185. * should treat the first argument
  186. * as a verbatim command line
  187. * and ignore the rest of the arguments.
  188. * 0 = No (default)
  189. * 1 = Yes
  190. *
  191. * kwsysProcess_Option_CreateProcessGroup = Whether to place the process in a
  192. * new process group. This is
  193. * useful if you want to send Ctrl+C
  194. * to the process. On UNIX, also
  195. * places the process in a new
  196. * session.
  197. * 0 = No (default)
  198. * 1 = Yes
  199. */
  200. kwsysEXPORT int kwsysProcess_GetOption(kwsysProcess* cp, int optionId);
  201. kwsysEXPORT void kwsysProcess_SetOption(kwsysProcess* cp, int optionId,
  202. int value);
  203. enum kwsysProcess_Option_e
  204. {
  205. kwsysProcess_Option_HideWindow,
  206. kwsysProcess_Option_Detach,
  207. kwsysProcess_Option_MergeOutput,
  208. kwsysProcess_Option_Verbatim,
  209. kwsysProcess_Option_CreateProcessGroup
  210. };
  211. /**
  212. * Get the current state of the Process instance. Possible states are:
  213. *
  214. * kwsysProcess_State_Starting = Execute has not yet been called.
  215. * kwsysProcess_State_Error = Error administrating the child process.
  216. * kwsysProcess_State_Exception = Child process exited abnormally.
  217. * kwsysProcess_State_Executing = Child process is currently running.
  218. * kwsysProcess_State_Exited = Child process exited normally.
  219. * kwsysProcess_State_Expired = Child process's timeout expired.
  220. * kwsysProcess_State_Killed = Child process terminated by Kill method.
  221. * kwsysProcess_State_Disowned = Child is no longer managed by this object.
  222. */
  223. kwsysEXPORT int kwsysProcess_GetState(kwsysProcess* cp);
  224. enum kwsysProcess_State_e
  225. {
  226. kwsysProcess_State_Starting,
  227. kwsysProcess_State_Error,
  228. kwsysProcess_State_Exception,
  229. kwsysProcess_State_Executing,
  230. kwsysProcess_State_Exited,
  231. kwsysProcess_State_Expired,
  232. kwsysProcess_State_Killed,
  233. kwsysProcess_State_Disowned
  234. };
  235. /**
  236. * When GetState returns "Exception", this method returns a
  237. * platform-independent description of the exceptional behavior that
  238. * caused the child to terminate abnormally. Possible exceptions are:
  239. *
  240. * kwsysProcess_Exception_None = No exceptional behavior occurred.
  241. * kwsysProcess_Exception_Fault = Child crashed with a memory fault.
  242. * kwsysProcess_Exception_Illegal = Child crashed with an illegal
  243. * instruction.
  244. * kwsysProcess_Exception_Interrupt = Child was interrupted by user
  245. * (Cntl-C/Break).
  246. * kwsysProcess_Exception_Numerical = Child crashed with a numerical
  247. * exception.
  248. * kwsysProcess_Exception_Other = Child terminated for another reason.
  249. */
  250. kwsysEXPORT int kwsysProcess_GetExitException(kwsysProcess* cp);
  251. enum kwsysProcess_Exception_e
  252. {
  253. kwsysProcess_Exception_None,
  254. kwsysProcess_Exception_Fault,
  255. kwsysProcess_Exception_Illegal,
  256. kwsysProcess_Exception_Interrupt,
  257. kwsysProcess_Exception_Numerical,
  258. kwsysProcess_Exception_Other
  259. };
  260. /**
  261. * When GetState returns "Exited" or "Exception", this method returns
  262. * the platform-specific raw exit code of the process. UNIX platforms
  263. * should use WIFEXITED/WEXITSTATUS and WIFSIGNALED/WTERMSIG to access
  264. * this value. Windows users should compare the value to the various
  265. * EXCEPTION_* values.
  266. *
  267. * If GetState returns "Exited", use GetExitValue to get the
  268. * platform-independent child return value.
  269. */
  270. kwsysEXPORT int kwsysProcess_GetExitCode(kwsysProcess* cp);
  271. /**
  272. * When GetState returns "Exited", this method returns the child's
  273. * platform-independent exit code (such as the value returned by the
  274. * child's main).
  275. */
  276. kwsysEXPORT int kwsysProcess_GetExitValue(kwsysProcess* cp);
  277. /**
  278. * When GetState returns "Error", this method returns a string
  279. * describing the problem. Otherwise, it returns NULL.
  280. */
  281. kwsysEXPORT const char* kwsysProcess_GetErrorString(kwsysProcess* cp);
  282. /**
  283. * When GetState returns "Exception", this method returns a string
  284. * describing the problem. Otherwise, it returns NULL.
  285. */
  286. kwsysEXPORT const char* kwsysProcess_GetExceptionString(kwsysProcess* cp);
  287. /**
  288. * Get the current state of the Process instance. Possible states are:
  289. *
  290. * kwsysProcess_StateByIndex_Starting = Execute has not yet been called.
  291. * kwsysProcess_StateByIndex_Exception = Child process exited abnormally.
  292. * kwsysProcess_StateByIndex_Exited = Child process exited normally.
  293. * kwsysProcess_StateByIndex_Error = Error getting the child return code.
  294. */
  295. kwsysEXPORT int kwsysProcess_GetStateByIndex(kwsysProcess* cp, int idx);
  296. enum kwsysProcess_StateByIndex_e
  297. {
  298. kwsysProcess_StateByIndex_Starting = kwsysProcess_State_Starting,
  299. kwsysProcess_StateByIndex_Exception = kwsysProcess_State_Exception,
  300. kwsysProcess_StateByIndex_Exited = kwsysProcess_State_Exited,
  301. kwsysProcess_StateByIndex_Error = kwsysProcess_State_Error
  302. };
  303. /**
  304. * When GetState returns "Exception", this method returns a
  305. * platform-independent description of the exceptional behavior that
  306. * caused the child to terminate abnormally. Possible exceptions are:
  307. *
  308. * kwsysProcess_Exception_None = No exceptional behavior occurred.
  309. * kwsysProcess_Exception_Fault = Child crashed with a memory fault.
  310. * kwsysProcess_Exception_Illegal = Child crashed with an illegal
  311. * instruction.
  312. * kwsysProcess_Exception_Interrupt = Child was interrupted by user
  313. * (Cntl-C/Break).
  314. * kwsysProcess_Exception_Numerical = Child crashed with a numerical
  315. * exception.
  316. * kwsysProcess_Exception_Other = Child terminated for another reason.
  317. */
  318. kwsysEXPORT int kwsysProcess_GetExitExceptionByIndex(kwsysProcess* cp,
  319. int idx);
  320. /**
  321. * When GetState returns "Exited" or "Exception", this method returns
  322. * the platform-specific raw exit code of the process. UNIX platforms
  323. * should use WIFEXITED/WEXITSTATUS and WIFSIGNALED/WTERMSIG to access
  324. * this value. Windows users should compare the value to the various
  325. * EXCEPTION_* values.
  326. *
  327. * If GetState returns "Exited", use GetExitValue to get the
  328. * platform-independent child return value.
  329. */
  330. kwsysEXPORT int kwsysProcess_GetExitCodeByIndex(kwsysProcess* cp, int idx);
  331. /**
  332. * When GetState returns "Exited", this method returns the child's
  333. * platform-independent exit code (such as the value returned by the
  334. * child's main).
  335. */
  336. kwsysEXPORT int kwsysProcess_GetExitValueByIndex(kwsysProcess* cp, int idx);
  337. /**
  338. * When GetState returns "Exception", this method returns a string
  339. * describing the problem. Otherwise, it returns NULL.
  340. */
  341. kwsysEXPORT const char* kwsysProcess_GetExceptionStringByIndex(
  342. kwsysProcess* cp, int idx);
  343. /**
  344. * Start executing the child process.
  345. */
  346. kwsysEXPORT void kwsysProcess_Execute(kwsysProcess* cp);
  347. /**
  348. * Stop management of a detached child process. This closes any pipes
  349. * being read. If the child was not created with the
  350. * kwsysProcess_Option_Detach option, this method does nothing. This
  351. * is because disowning a non-detached process will cause the child
  352. * exit signal to be left unhandled until this process exits.
  353. */
  354. kwsysEXPORT void kwsysProcess_Disown(kwsysProcess* cp);
  355. /**
  356. * Block until data are available on a pipe, a timeout expires, or the
  357. * child process terminates. Arguments are as follows:
  358. *
  359. * data = If data are read, the pointer to which this points is
  360. * set to point to the data.
  361. * length = If data are read, the integer to which this points is
  362. * set to the length of the data read.
  363. * timeout = Specifies the maximum time this call may block. Upon
  364. * return after reading data, the time elapsed is subtracted
  365. * from the timeout value. If this timeout expires, the
  366. * value is set to 0. A NULL pointer passed for this argument
  367. * indicates no timeout for the call. A negative or zero
  368. * value passed for this argument may be used for polling
  369. * and will always return immediately.
  370. *
  371. * Return value will be one of:
  372. *
  373. * Pipe_None = No more data will be available from the child process,
  374. * ( == 0) or no process has been executed. WaitForExit should
  375. * be called to wait for the process to terminate.
  376. * Pipe_STDOUT = Data have been read from the child's stdout pipe.
  377. * Pipe_STDERR = Data have been read from the child's stderr pipe.
  378. * Pipe_Timeout = No data available within timeout specified for the
  379. * call. Time elapsed has been subtracted from timeout
  380. * argument.
  381. */
  382. kwsysEXPORT int kwsysProcess_WaitForData(kwsysProcess* cp, char** data,
  383. int* length, double* timeout);
  384. enum kwsysProcess_Pipes_e
  385. {
  386. kwsysProcess_Pipe_None,
  387. kwsysProcess_Pipe_STDIN,
  388. kwsysProcess_Pipe_STDOUT,
  389. kwsysProcess_Pipe_STDERR,
  390. kwsysProcess_Pipe_Timeout = 255
  391. };
  392. /**
  393. * Block until the child process terminates or the given timeout
  394. * expires. If no process is running, returns immediately. The
  395. * argument is:
  396. *
  397. * timeout = Specifies the maximum time this call may block. Upon
  398. * returning due to child termination, the elapsed time
  399. * is subtracted from the given value. A NULL pointer
  400. * passed for this argument indicates no timeout for the
  401. * call.
  402. *
  403. * Return value will be one of:
  404. *
  405. * 0 = Child did not terminate within timeout specified for
  406. * the call. Time elapsed has been subtracted from timeout
  407. * argument.
  408. * 1 = Child has terminated or was not running.
  409. */
  410. kwsysEXPORT int kwsysProcess_WaitForExit(kwsysProcess* cp, double* timeout);
  411. /**
  412. * Interrupt the process group for the child process that is currently
  413. * running by sending it the appropriate operating-system specific signal.
  414. * The caller should call WaitForExit after this returns to wait for the
  415. * child to terminate.
  416. *
  417. * WARNING: If you didn't specify kwsysProcess_Option_CreateProcessGroup,
  418. * you will interrupt your own process group.
  419. */
  420. kwsysEXPORT void kwsysProcess_Interrupt(kwsysProcess* cp);
  421. /**
  422. * Forcefully terminate the child process that is currently running.
  423. * The caller should call WaitForExit after this returns to wait for
  424. * the child to terminate.
  425. */
  426. kwsysEXPORT void kwsysProcess_Kill(kwsysProcess* cp);
  427. /**
  428. * Same as kwsysProcess_Kill using process ID to locate process to
  429. * terminate.
  430. * @see kwsysProcess_Kill(kwsysProcess* cp)
  431. */
  432. kwsysEXPORT void kwsysProcess_KillPID(unsigned long);
  433. /**
  434. * Reset the start time of the child process to the current time.
  435. */
  436. kwsysEXPORT void kwsysProcess_ResetStartTime(kwsysProcess* cp);
  437. #if defined(__cplusplus)
  438. } /* extern "C" */
  439. #endif
  440. /* If we are building a kwsys .c or .cxx file, let it use these macros.
  441. Otherwise, undefine them to keep the namespace clean. */
  442. #if !defined(KWSYS_NAMESPACE)
  443. #undef kwsys_ns
  444. #undef kwsysEXPORT
  445. #if !cmsys_NAME_IS_KWSYS
  446. #undef kwsysProcess
  447. #undef kwsysProcess_s
  448. #undef kwsysProcess_New
  449. #undef kwsysProcess_Delete
  450. #undef kwsysProcess_SetCommand
  451. #undef kwsysProcess_AddCommand
  452. #undef kwsysProcess_SetTimeout
  453. #undef kwsysProcess_SetWorkingDirectory
  454. #undef kwsysProcess_SetPipeFile
  455. #undef kwsysProcess_SetPipeNative
  456. #undef kwsysProcess_SetPipeShared
  457. #undef kwsysProcess_Option_Detach
  458. #undef kwsysProcess_Option_HideWindow
  459. #undef kwsysProcess_Option_MergeOutput
  460. #undef kwsysProcess_Option_Verbatim
  461. #undef kwsysProcess_Option_CreateProcessGroup
  462. #undef kwsysProcess_GetOption
  463. #undef kwsysProcess_SetOption
  464. #undef kwsysProcess_Option_e
  465. #undef kwsysProcess_State_Starting
  466. #undef kwsysProcess_State_Error
  467. #undef kwsysProcess_State_Exception
  468. #undef kwsysProcess_State_Executing
  469. #undef kwsysProcess_State_Exited
  470. #undef kwsysProcess_State_Expired
  471. #undef kwsysProcess_State_Killed
  472. #undef kwsysProcess_State_Disowned
  473. #undef kwsysProcess_GetState
  474. #undef kwsysProcess_State_e
  475. #undef kwsysProcess_Exception_None
  476. #undef kwsysProcess_Exception_Fault
  477. #undef kwsysProcess_Exception_Illegal
  478. #undef kwsysProcess_Exception_Interrupt
  479. #undef kwsysProcess_Exception_Numerical
  480. #undef kwsysProcess_Exception_Other
  481. #undef kwsysProcess_GetExitException
  482. #undef kwsysProcess_Exception_e
  483. #undef kwsysProcess_GetExitCode
  484. #undef kwsysProcess_GetExitValue
  485. #undef kwsysProcess_GetErrorString
  486. #undef kwsysProcess_GetExceptionString
  487. #undef kwsysProcess_Execute
  488. #undef kwsysProcess_Disown
  489. #undef kwsysProcess_WaitForData
  490. #undef kwsysProcess_Pipes_e
  491. #undef kwsysProcess_Pipe_None
  492. #undef kwsysProcess_Pipe_STDIN
  493. #undef kwsysProcess_Pipe_STDOUT
  494. #undef kwsysProcess_Pipe_STDERR
  495. #undef kwsysProcess_Pipe_Timeout
  496. #undef kwsysProcess_Pipe_Handle
  497. #undef kwsysProcess_WaitForExit
  498. #undef kwsysProcess_Interrupt
  499. #undef kwsysProcess_Kill
  500. #undef kwsysProcess_ResetStartTime
  501. #endif
  502. #endif
  503. #endif