Disabling stdout buffering of a forked process

后端 未结 4 1422
一生所求
一生所求 2020-12-17 23:44

I wrote a code in C/C++ which forks a child process, duplicates the stdin/stdout into a pipe ends and calls execvp.

Everything is working fine (i.e. the output from

4条回答
  •  -上瘾入骨i
    2020-12-18 00:22

    If you ever need to achieve more control over the buffering of the child process, I made a module that expose features of the stdbuf preload trick, see this self answered question of mine:

    C Control buffering of Child process

提交回复
热议问题