I’m using the following code to open a named pipe located at ‘/tmp/xyz’ for read only access:
#!/usr/bin/perl
use strict;
use Fcntl;
...
sysopen(FIFO, "/tmp/xyz", O_RDONLY) or die ("opening named pipe failed: $!\n");
...
The problem is, that sysopen hangs upon calling. It neither ‘dies’ nor code after the call is executed.
output of ls -la /tmp/xyz:
prw-r--r-- 1 user group 0 Jun 20 11:45 /tmp/xyz
Anybody got an idea, what’s happening? Thanks in advance!
You opened it in blocking mode, program will not continue until someone writes into the FIFO.
You probably want to open it non-blocking: