开发者

Reopening a closed Piped read file descriptor?

开发者 https://www.devze.com 2022-12-13 05:14 出处:网络
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 anyon

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

精彩评论

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