Retrieving exit status value from executable in Ruby with Open3

351 Views Asked by At

Launching

stdout, status = Open3.capture2("ls")
if (status == 0)
  puts("PASS")
else
  puts("FAIL")

works like a charm, however when I try to use

stdout, status = Open3.capture2("../src/bin tests/test01.txt")

to launch an executable bin with his argument's path (which works from my command line, I checked with echo $?), it seems to enter an infinite loop. I tried capture3 and popen3, same thing.

Any idea about what could be wrong?

0

There are 0 best solutions below