Your message dated Sun, 13 Nov 2011 17:08:29 +0000
with message-id <[email protected]>
and subject line Fixed in perl 5.14
has caused the Debian Bug report #646016,
regarding perl: undefined behaviour in ext/POSIX/t/sysconf.t wrt FIFOs
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
646016: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646016
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: perl
Version: 5.14.2-1
Severity: normal
Tags: patch
Hi,
while compiling perl 5.14.2 on GNU/Hurd, I ran into what it seems a
undefined POSIX behaviour in ext/POSIX/t/sysconf.t.
my $fd = POSIX::open($fifo, O_RDWR)
or skip("could not open $fifo ($!)", 3 * @path_consts_fifo);
according to the POSIX open()[1] about O_RDWR,
The result is undefined if this flag is applied to a FIFO.
.... which is actually our case.
Apparently Linux and *FreeBSD (and maybe also OSes) accept this
behaviour, but on GNU/Hurd this causes the open() call to block
undefinitely. Given there's nothing done with the FIFO if not querying
{,f}pathconf() values, the proposed solution I attached is to change
the opening mode to "O_RDONLY | O_NONBLOCK".
[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html
Thanks,
--
Pino
--- a/ext/POSIX/t/sysconf.t
+++ b/ext/POSIX/t/sysconf.t
@@ -130,7 +130,7 @@
or skip("could not create fifo $fifo ($!)", 2 * 3 * @path_consts_fifo);
SKIP: {
- my $fd = POSIX::open($fifo, O_RDWR)
+ my $fd = POSIX::open($fifo, O_RDONLY | O_NONBLOCK)
or skip("could not open $fifo ($!)", 3 * @path_consts_fifo);
for my $constant (@path_consts_fifo) {
--- End Message ---
--- Begin Message ---
I believe that these bugs have all been fixed in perl 5.14, which
has now migrated from experimental to unstable.
Dominic.
--
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)
--- End Message ---