pipe gzip error

G

George Mpouras

Any one knows why I am getting this "Illegal seek" error ?

use strict;
use warnings;
my $fh;
open $fh, '| /bin/gzip --force --quiet > "/tmp/akuro1.1316680468"' or warn
"oups: $^E\n";
print "problem *$?* *$^E* *$!*\n";
close $fh;
 
R

Rainer Weikusat

George Mpouras said:
Any one knows why I am getting this "Illegal seek" error ?

use strict;
use warnings;
my $fh;
open $fh, '| /bin/gzip --force --quiet > "/tmp/akuro1.1316680468"' or warn
"oups: $^E\n";
print "problem *$?* *$^E* *$!*\n";
close $fh;

That's because of an lseek performed by some library routine with
the failure apparently considered to be harmless. Generally, a
specific value of errno aka $! is not an indication that 'an error
occurred' on its own: This is only the case when 'an error occurred'
was specifically signalled to the code calling a 'system routine'.
And that's not the case with the code above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top