Skip to content
Snippets Groups Projects
  • Nadav Har'El's avatar
    1fe04ab3
    com.cloudius.util.Exec.run() used to return main()'s exit code in a · 1fe04ab3
    Nadav Har'El authored
    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...).
    1fe04ab3
    History
    com.cloudius.util.Exec.run() used to return main()'s exit code in a
    Nadav Har'El authored
    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...).