Fix Centurion name.
[0ad.git] / libraries / source / spidermonkey / include-win32-debug / nspr / prproces.h
blobdd10469f824ab83f31d0ef47e3bc481c15edae18
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef prproces_h___
7 #define prproces_h___
9 #include "prtypes.h"
10 #include "prio.h"
12 PR_BEGIN_EXTERN_C
14 /************************************************************************/
15 /*****************************PROCESS OPERATIONS*************************/
16 /************************************************************************/
18 typedef struct PRProcess PRProcess;
19 typedef struct PRProcessAttr PRProcessAttr;
21 NSPR_API(PRProcessAttr *) PR_NewProcessAttr(void);
23 NSPR_API(void) PR_ResetProcessAttr(PRProcessAttr *attr);
25 NSPR_API(void) PR_DestroyProcessAttr(PRProcessAttr *attr);
27 NSPR_API(void) PR_ProcessAttrSetStdioRedirect(
28 PRProcessAttr *attr,
29 PRSpecialFD stdioFd,
30 PRFileDesc *redirectFd
34 * OBSOLETE -- use PR_ProcessAttrSetStdioRedirect instead.
36 NSPR_API(void) PR_SetStdioRedirect(
37 PRProcessAttr *attr,
38 PRSpecialFD stdioFd,
39 PRFileDesc *redirectFd
42 NSPR_API(PRStatus) PR_ProcessAttrSetCurrentDirectory(
43 PRProcessAttr *attr,
44 const char *dir
47 NSPR_API(PRStatus) PR_ProcessAttrSetInheritableFD(
48 PRProcessAttr *attr,
49 PRFileDesc *fd,
50 const char *name
54 ** Create a new process
56 ** Create a new process executing the file specified as 'path' and with
57 ** the supplied arguments and environment.
59 ** This function may fail because of illegal access (permissions),
60 ** invalid arguments or insufficient resources.
62 ** A process may be created such that the creator can later synchronize its
63 ** termination using PR_WaitProcess().
66 NSPR_API(PRProcess*) PR_CreateProcess(
67 const char *path,
68 char *const *argv,
69 char *const *envp,
70 const PRProcessAttr *attr);
72 NSPR_API(PRStatus) PR_CreateProcessDetached(
73 const char *path,
74 char *const *argv,
75 char *const *envp,
76 const PRProcessAttr *attr);
78 NSPR_API(PRStatus) PR_DetachProcess(PRProcess *process);
80 NSPR_API(PRStatus) PR_WaitProcess(PRProcess *process, PRInt32 *exitCode);
82 NSPR_API(PRStatus) PR_KillProcess(PRProcess *process);
84 PR_END_EXTERN_C
86 #endif /* prproces_h___ */