Skip to content
Snippets Groups Projects
Commit 1fe04ab3 authored by Nadav Har'El's avatar Nadav Har'El
Browse files

com.cloudius.util.Exec.run() used to return main()'s exit code in a

class-static variable, which is not only strange, it also means we
cannot concurrently run several programs in several threads.

Change it so run() returns the (32-bit) return value, and when execution
fails (e.g., file not found), it throws an IOException.

Note that unlike Unix where main()'s return value is limited to 8 bits,
here we decided to allow the full gamut (63-bit) of return values from
main(). main() may return -23 or 2323813 and this does not indicate
an error running it (only an exception indicates an error).

This patch also removes the arbitrary limit of 256 command line arguments
(not that anyone would need more...).
parent ec2b7edb
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment