Forum Navigation
Process stdout of running process
Posted: 07/17/09 17:34:55Hi, I'm trying to read the output from a tango.sys.Process instance. But if the process exits i can easily look at the output in Process.stdout, if it does not exit and does not print too much lines, i get no output. For example look at this code:
module main; import tango.sys.Process; import tango.io.stream.Lines; import tango.io.Stdout; int main(){ auto p = new Process("hcidump", null); p.execute; foreach (line; new Lines!(char)(p.stdout)) { Stdout(line).newline; } return 0; }hcidump needs root privileges, or it exits. If i run with a normal user i get the stdout printed, if i run the program as root i don't get anything. Note that hcidump writes on stdout information about each buetooth packet received.
How can i access each line of hcidump stdout? thx.