I've just hit a problem where the system() method to call an external program failed in a fairly unpredictable way, and I couldn't get any clues from within ruby to diagnose the problem, so I ended up debugging process.c to work out what the problem was.
irb(main):006:0> system '/bin/sh -c "exit 1"'
=> false
irb(main):007:0> system '/bin/sh -c "exit 0"'
=> true
system("/bin/tar --extract --directory=#{dir} --file=#{file}") or
raise "tar unpack failed"
Kind regards
robert
···
On Wed, Feb 2, 2011 at 5:49 PM, Anthony Wright <anthony@overnetdata.com> wrote:
I've just hit a problem where the system() method to call an external program failed in a fairly unpredictable way, and I couldn't get any clues from within ruby to diagnose the problem, so I ended up debugging process.c to work out what the problem was.