Changeset 717
- Timestamp:
- 07/27/07 16:14:24 (1 year ago)
- Files:
-
- other/dps/trunk/dsssps/process.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
other/dps/trunk/dsssps/process.d
r710 r717 7 7 import tango.sys.Process; 8 8 9 // FIXME: Windows?10 version (Posix) {11 import tango.stdc.posix.fcntl;12 import tango.stdc.posix.sys.wait;13 }14 15 9 import wx.wx; 16 10 17 11 import dsssps.dps; 12 13 extern (C) { 14 int fcntl(int fd, int cmd, long arg = 0); 15 const int F_GETFL = 3; 16 const int F_SETFL = 4; 17 const int O_NONBLOCK = 04000; 18 19 int waitpid(int pid, int *status, int options); 20 const int WNOHANG = 1; 21 } 18 22 19 23 /// Run a process and pipe its output into a visible buffer … … 29 33 30 34 // make it nonblocking if possible 31 version (Posix) { 32 fcntl(proc.stdout.fileHandle(), F_SETFL, 33 fcntl(proc.stdout.fileHandle(), F_GETFL) | O_NONBLOCK); 34 } else { 35 static assert(0); 36 } 35 fcntl(proc.stdout.fileHandle(), F_SETFL, 36 fcntl(proc.stdout.fileHandle(), F_GETFL) | O_NONBLOCK); 37 37 38 38 // set up the text area
