开发者

Reopening a closed Piped read file descriptor?

I have used pip开发者_StackOverflowes to facilitate interprocess communication. They work just fine. But in my scenario I want to close and reopen the read end of the file descriptor fd[0]. Does anyone know how to do that?


You cannot reopen an unnamed pipe. If you really need to do this reopening magic, consider using named pipes, that can be opened and reopened as many times as you wish. But before doing it, consider whether it makes any sense at all.


You can't reopen a pipe between two processes after either side has closed it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜