-
- Downloads
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...).
Showing
- console/run.js 1 addition, 1 deletionconsole/run.js
- java/cli/com/cloudius/cli/tests/TestELF.java 6 additions, 5 deletionsjava/cli/com/cloudius/cli/tests/TestELF.java
- java/cli/com/cloudius/cli/util/ELFLoader.java 8 additions, 8 deletionsjava/cli/com/cloudius/cli/util/ELFLoader.java
- java/cloudius/com/cloudius/util/Exec.java 16 additions, 5 deletionsjava/cloudius/com/cloudius/util/Exec.java
- java/jni/elf-loader.cc 19 additions, 22 deletionsjava/jni/elf-loader.cc
Loading
Please register or sign in to comment