Class SpawnProcess.ExitStatus

java.lang.Object
com.kosdev.kos.core.service.spawn.SpawnProcess.ExitStatus
Enclosing class:
SpawnProcess

public static class SpawnProcess.ExitStatus extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Return the exit code for the process if it exited normally.
    int
    Return the signal code that terminated the process if it exited abnormally.
    boolean
    Returns true if the process exited due to a signal (sigterm, sigfault, etc...) instead of a normal exit calling exit() .
    boolean
    Returns true if the process exited normally by calling exit() , or false if the process exited due to a signal (sigterm, sigfault, etc...).

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExitStatus

      public ExitStatus()
  • Method Details

    • isNormalExit

      public boolean isNormalExit()
      Returns true if the process exited normally by calling exit() , or false if the process exited due to a signal (sigterm, sigfault, etc...). This is the opposite of isAbnormalExit() .

      If this is true, exitCode represents the value the program passed to exit() .

      Since:
      10
    • getExitCode

      public int getExitCode()
      Return the exit code for the process if it exited normally. This is the value the program passed to exit() .
      Since:
      10
    • isAbnormalExit

      public boolean isAbnormalExit()
      Returns true if the process exited due to a signal (sigterm, sigfault, etc...) instead of a normal exit calling exit() . This is the opposite of isNormalExit() .

      If this is true, signalNum represents the linux signal number that caused the program to exit.

      Since:
      10
    • getSignalNum

      public int getSignalNum()
      Return the signal code that terminated the process if it exited abnormally.
      Since:
      10