comparison lphobos/std/c/process.d @ 1:c53b6e3fe49a trunk

[svn r5] Initial commit. Most things are very rough.
author lindquist
date Sat, 01 Sep 2007 21:43:27 +0200
parents
children
comparison
equal deleted inserted replaced
0:a9e71648e74d 1:c53b6e3fe49a
1
2 /**
3 * C's <process.h>
4 * Authors: Walter Bright, Digital Mars, www.digitalmars.com
5 * License: Public Domain
6 * Macros:
7 * WIKI=Phobos/StdCProcess
8 */
9
10 module std.c.process;
11
12 private import std.c.stddef;
13
14 extern (C):
15
16 void exit(int);
17 void _c_exit();
18 void _cexit();
19 void _exit(int);
20 void abort();
21 void _dodtors();
22 int getpid();
23
24 int system(char *);
25
26 enum { _P_WAIT, _P_NOWAIT, _P_OVERLAY };
27
28 int execl(char *, char *,...);
29 int execle(char *, char *,...);
30 int execlp(char *, char *,...);
31 int execlpe(char *, char *,...);
32 int execv(char *, char **);
33 int execve(char *, char **, char **);
34 int execvp(char *, char **);
35 int execvpe(char *, char **, char **);
36
37
38 enum { WAIT_CHILD, WAIT_GRANDCHILD }
39
40 int cwait(int *,int,int);
41 int wait(int *);
42
43 version (Windows)
44 {
45 uint _beginthread(void function(void *),uint,void *);
46
47 extern (Windows) alias uint (*stdfp)(void *);
48
49 uint _beginthreadex(void* security, uint stack_size,
50 stdfp start_addr, void* arglist, uint initflag,
51 uint* thrdaddr);
52
53 void _endthread();
54 void _endthreadex(uint);
55
56 int spawnl(int, char *, char *,...);
57 int spawnle(int, char *, char *,...);
58 int spawnlp(int, char *, char *,...);
59 int spawnlpe(int, char *, char *,...);
60 int spawnv(int, char *, char **);
61 int spawnve(int, char *, char **, char **);
62 int spawnvp(int, char *, char **);
63 int spawnvpe(int, char *, char **, char **);
64
65
66 int _wsystem(wchar_t *);
67 int _wspawnl(int, wchar_t *, wchar_t *, ...);
68 int _wspawnle(int, wchar_t *, wchar_t *, ...);
69 int _wspawnlp(int, wchar_t *, wchar_t *, ...);
70 int _wspawnlpe(int, wchar_t *, wchar_t *, ...);
71 int _wspawnv(int, wchar_t *, wchar_t **);
72 int _wspawnve(int, wchar_t *, wchar_t **, wchar_t **);
73 int _wspawnvp(int, wchar_t *, wchar_t **);
74 int _wspawnvpe(int, wchar_t *, wchar_t **, wchar_t **);
75
76 int _wexecl(wchar_t *, wchar_t *, ...);
77 int _wexecle(wchar_t *, wchar_t *, ...);
78 int _wexeclp(wchar_t *, wchar_t *, ...);
79 int _wexeclpe(wchar_t *, wchar_t *, ...);
80 int _wexecv(wchar_t *, wchar_t **);
81 int _wexecve(wchar_t *, wchar_t **, wchar_t **);
82 int _wexecvp(wchar_t *, wchar_t **);
83 int _wexecvpe(wchar_t *, wchar_t **, wchar_t **);
84 }
85
86