exec empty ret

Post Reply
aitchon
Posts: 118
Joined: Mon Jan 22, 2007 10:30 am

exec empty ret

Post by aitchon »

Why is $ret from this command empty?

<exec nobr "/usr/bin/java" "-version"></exec>

I even tried running as root, but get exit code 127. I verified that /usr/bin/java exists.
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

exec empty ret

Post by Kai »

If you're running this in a Vortex script in a web request, the web server's environment may not allow execution of subprocesses in the restricted CGI environment.

What do $ret.stderr and $ret.err contain after this statement? What is written to vortex.log?
aitchon
Posts: 118
Joined: Mon Jan 22, 2007 10:30 am

exec empty ret

Post by aitchon »

The script is being run from the command line. ret.err is empty, but ret.stderr returns what I expected in $ret:

openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

vortex.log is empty
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

exec empty ret

Post by John »

That just means that java is outputting the version information to the standard error handle rather than standard output. On the command line you typically see both without distinction between them.
John Turnbull
Thunderstone Software
Post Reply