G
G
GeraZlo2015-02-18 13:51:09
linux
GeraZlo, 2015-02-18 13:51:09

Python named pipes on Linux. How to read and write?

OS: CentOS 7
Python: 2.4.
Created a named pipe in Linux, using the OS itself through:

mkfifo
. I'm trying to open it for reading like this:
pipe = open("testpipe","r")
But the program just hangs on this command. Does not crash on an exception, but freezes, interruption on
ctrl+c
works, so, in fact, I complete its work.
What could be the problem and how to deal with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2015-02-18
@GeraZlo

Perhaps this is not a problem.
You are working with a named pipe. If you read it, the program does not freeze, but waits for someone to write something to this channel.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question