#Stop ChildProcess from writing to stdout

1 messages · Page 1 of 1 (latest)

marsh talon
#

Hello, I'm testing out running commands from Zig and currently this is what I'm doing

var proc = std.ChildProcess.init(command, alloc);
try proc.spawn();
_ = try proc.wait();

All is well and the command runs, but it writes to stdout in the terminal, and I don't want that. Is there a way to tell the ChildProcess not to write to stdout?

regal hedge
#

proc.stdout_behavior = .Ignore pretty sure

marsh talon
#

Already tried it and it still gives output

regal hedge
#

works for me, where did you put the line?

marsh talon
#

nvm, I found what the issue was

#

the program I was running was writing to stderr and stdout

#

so I set both proc_behaviors to .Ignore and it works

#

thanks for the help