Chat Logs

  1. jreicherChronos: because it's the JVM "implementing" that exit code. If it wanted, it could override any exit code written in the Java code it's running.
  2. Chronosjreicher: Ah, that makes sense. Your carefully crafted exit code could easily be overridden, so you can't count on it.
  3. dreamrealbut that's the case for any of them
  4. dreamrealincluding C
  5. dreamrealthe only way you're going to guarantee that sort of thing is at the language spec level, and you have to trust the spec for it to be true anyway
  6. jreicherI was thinking that, and realised I never looked at the Java language spec for this.
  7. jreicherhttps://docs.oracle.com/javase/specs/jls/se25/html/jls-12.html#jls-12.8
  8. nevetChapter 12. Execution
  9. dreamrealjreicher: https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#exit(int) is more important for this
  10. nevetSystem (Java SE 25 & JDK 25)
  11. dreamrealAnd, of course, https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Runtime.html
  12. nevetRuntime (Java SE 25 & JDK 25)
  13. jreicherThose two are actually referred to explicitly in the language spec section I linked
  14. dreamrealyes, but you'd have to follow them links!!!
  15. dreamreal!!11!
  16. jreicher:)