pipe gzip error

Discussion in 'Perl Misc' started by George Mpouras, Sep 22, 2011.

  1. 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;
     
    George Mpouras, Sep 22, 2011
    #1
    1. Advertising

  2. "George Mpouras" <> writes:
    > 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.
     
    Rainer Weikusat, Sep 22, 2011
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chad A. Beckner

    GZip Compression for IIS 5.0/ASP .NET

    Chad A. Beckner, Jun 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    590
    Landi
    Jul 23, 2004
  2. lee, wonsun
    Replies:
    1
    Views:
    506
    Jack Klein
    Nov 2, 2004
  3. syahreza.octadian

    import gzip error (please help)

    syahreza.octadian, Jan 11, 2008, in forum: Python
    Replies:
    2
    Views:
    637
    syahreza.octadian
    Jan 14, 2008
  4. Rémi Gagnon
    Replies:
    2
    Views:
    396
    Michel Brito
    Apr 23, 2009
  5. Replies:
    1
    Views:
    250
    Ben Morrow
    Jun 2, 2004
Loading...

Share This Page