Disable stdout in popen process

33 Views Asked by At

I'm using popen function in C to run external program in my project. As far as I know popen creates pipe and pipe is buffer-blocking process. The problem is my program, that runs in pipe produces a lot of output.

I don't need this output but I don't read it, so my process is stick on buffer overflowing.

My question: is there any way to totally disable output of process? I tried stdbuf -o0 %my_command% but it didn't help.

0

There are 0 best solutions below