[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problems with PERL 5.10 and system pipe



On Thu, 24 Sep 2009 14:13:24 +0300, Damyan Ivanov wrote:

> > May be smb know what the problem? Or it's a bug in a perl package?
> The same thing happens with the following simple test C program:

Yup, same in bash:

Terminal 1:
gregoa@colleen:~$ mkfifo /tmp/fifo
gregoa@colleen:~$ cat /tmp/fifo

<hangs until ...> 

Terminal 2:
gregoa@colleen:~$ echo foo > /tmp/fifo
gregoa@colleen:~$

<... now in terminal 1>

foo
gregoa@colleen:~$

> So the problem seems to be global, not specific to perl. Perhaps the 
> kernel has changed the way the pipes are opened?

/me vaguely remembers something about non-blocking open()s ..

gregoa@colleen:~$ perl -MFcntl -e 'sysopen(PH, "/tmp/fifo", O_NONBLOCK)'
gregoa@colleen:~$ 

Works :)

Cheers,
gregor
 
-- 
 .''`.   http://info.comodo.priv.at/ -- GPG Key IDs: 0x00F3CFE4, 0x8649AA06
 : :' :  Debian GNU/Linux user, admin, & developer - http://www.debian.org/
 `. `'   Member of VIBE!AT, SPI Inc., fellow of FSFE | http://got.to/quote/
   `-    "Rome wasn't burned in a day. " 


Reply to: