1 /* 2 * Written by Sean Kelly 3 * Placed into Public Domain 4 */ 5 6 module tango.sys.win32.Process; 7 8 9 private 10 { 11 import tango.stdc.stdint; 12 import tango.stdc.stddef; 13 } 14 15 extern (C): 16 17 enum 18 { 19 P_WAIT, 20 P_NOWAIT, 21 P_OVERLAY, 22 P_NOWAITO, 23 P_DETACH, 24 } 25 26 enum 27 { 28 WAIT_CHILD, 29 WAIT_GRANDCHILD, 30 } 31 32 private 33 { 34 extern (C) alias void function(void*) bt_fptr; 35 extern (Windows) alias uint function(void*) btex_fptr; 36 } 37 38 uintptr_t _beginthread(bt_fptr, uint, void*); 39 void _endthread(); 40 uintptr_t _beginthreadex(void*, uint, btex_fptr, void*, uint, uint *); 41 void _endthreadex(uint); 42 43 void abort(); 44 void exit(int); 45 void _exit(int); 46 void _cexit(); 47 void _c_exit(); 48 49 intptr_t cwait(int*, intptr_t, int); 50 intptr_t wait(int*); 51 52 int getpid(); 53 int system(const(char)*); 54 55 intptr_t spawnl(int, const(char)*, const(char)*, ...); 56 intptr_t spawnle(int, const(char)*, const(char)*, ...); 57 intptr_t spawnlp(int, const(char)*, const(char)*, ...); 58 intptr_t spawnlpe(int, const(char)*, const(char)*, ...); 59 intptr_t spawnv(int, const(char)*, const(char)**); 60 intptr_t spawnve(int, const(char)*, const(char)**, const(char)**); 61 intptr_t spawnvp(int, const(char)*, const(char)**); 62 intptr_t spawnvpe(int, const(char)*, const(char)**, const(char)**); 63 64 intptr_t execl(const(char)*, const(char)*, ...); 65 intptr_t execle(const(char)*, const(char)*, ...); 66 intptr_t execlp(const(char)*, const(char)*, ...); 67 intptr_t execlpe(const(char)*, const(char)*, ...); 68 intptr_t execv(const(char)*, const(char)**); 69 intptr_t execve(const(char)*, const(char)**, const(char)**); 70 intptr_t execvp(const(char)*, const(char)**); 71 intptr_t execvpe(const(char)*, const(char)**, const(char)**); 72 73 int _wsystem(const(wchar_t)*); 74 75 intptr_t _wspawnl(int, const(wchar_t)*, const(wchar_t)*, ...); 76 intptr_t _wspawnle(int, const(wchar_t)*, const(wchar_t)*, ...); 77 intptr_t _wspawnlp(int, const(wchar_t)*, const(wchar_t)*, ...); 78 intptr_t _wspawnlpe(int, const(wchar_t)*, const(wchar_t)*, ...); 79 intptr_t _wspawnv(int, const(wchar_t)*, const(wchar_t)**); 80 intptr_t _wspawnve(int, const(wchar_t)*, const(wchar_t)**, const(wchar_t)**); 81 intptr_t _wspawnvp(int, const(wchar_t)*, const(wchar_t)**); 82 intptr_t _wspawnvpe(int, const(wchar_t)*, const(wchar_t)**, const(wchar_t)**); 83 84 intptr_t _wexecl(const(wchar_t)*, const(wchar_t)*, ...); 85 intptr_t _wexecle(const(wchar_t)*, const(wchar_t)*, ...); 86 intptr_t _wexeclp(const(wchar_t)*, const(wchar_t)*, ...); 87 intptr_t _wexeclpe(const(wchar_t)*, const(wchar_t)*, ...); 88 intptr_t _wexecv(const(wchar_t)*, const(wchar_t)**); 89 intptr_t _wexecve(const(wchar_t)*, const(wchar_t)**, const(wchar_t)**); 90 intptr_t _wexecvp(const(wchar_t)*, const(wchar_t)**); 91 intptr_t _wexecvpe(const(wchar_t)*, const(wchar_t)**, const(wchar_t)**);