How can Unix pipes be used between main process and thread?

前端 未结 5 651
慢半拍i
慢半拍i 2021-01-05 08:31

I am trying to channel data via pipes whenever a signal arrives from a thread to the main process.

Is this possible?
How can this be done?


The pr

5条回答
  •  失恋的感觉
    2021-01-05 08:43

    If you're talking about pipe() rather than |, then yes. Pipes can generally just be treated as a file descriptor. You just need to open the pipe and cleanup the input in one thread, and the output in the other.

提交回复
热议问题