Class GOSWindows

java.lang.Object
com.glitchybyte.glib.process.GOSInterface
com.glitchybyte.glib.process.GOSWindows

public final class GOSWindows extends GOSInterface
Specialization of GOSInterface for Windows.
  • Field Details

    • hackGetSignalCommand

      public static BiFunction<sun.misc.Signal,Long,String[]> hackGetSignalCommand
      Hack to provide a signal sender.

      windows-kill works perfectly for this.

      Once placed somewhere in your system it can be specified like this:

       GOSWindows.hackGetSignalCommand = (signal, pid) -> new String[] { "path/to/windows-kill.exe", "-SIG" + signal.getName(), pid.toString() };
       
  • Constructor Details

    • GOSWindows

      public GOSWindows()
      Creates a Windows OS interface.
  • Method Details

    • getShellCommand

      public String[] getShellCommand(String command)
      Description copied from class: GOSInterface
      Returns a command array ready to call the shell with the given script.
      Specified by:
      getShellCommand in class GOSInterface
      Parameters:
      command - Shell command with args.
      Returns:
      A new command string.
    • getSignalCommand

      public String[] getSignalCommand(sun.misc.Signal signal, long pid)
      Description copied from class: GOSInterface
      Returns the command array that will send the given signal to the pid.
      Specified by:
      getSignalCommand in class GOSInterface
      Parameters:
      signal - Signal to send.
      pid - Pid of process.
      Returns:
      Command array.