Forum: Ruby popen and bzip2

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
51763ff4e4c531c68326064bc13b84a6?d=identicon&s=25 David Weldon (5hundy)
on 2007-02-24 01:09
pipe = IO.popen('bzip2 -cd /home/dave/article.xml.bz2', 'r')

always gives me:

bzip2: I/O or other error, bailing out.  Possible reason follows.
bzip2: Broken pipe
  Input file = /home/dave/article.xml.bz2, output file = (stdout)

when the program completes. I have tried pipe.close, pipe.close_read. I
can read lines from the pipe which is all i want to do, but I don't get
why this error is coming up.

Thanks!

Dave
51763ff4e4c531c68326064bc13b84a6?d=identicon&s=25 David Weldon (5hundy)
on 2007-02-24 01:59
> always gives me:
>
> bzip2: I/O or other error, bailing out.  Possible reason follows.
> bzip2: Broken pipe
>   Input file = /home/dave/article.xml.bz2, output file = (stdout)

Sorry I think this was my mistake. If I run it in Radrails I get this
but on the cmd line I don't have the problem so this may be an IDE
artifact.
This topic is locked and can not be replied to.