Enum Class SubprocessFlags

java.lang.Object
java.lang.Enum<SubprocessFlags>
org.gnome.gio.SubprocessFlags
All Implemented Interfaces:
Serializable, Comparable<SubprocessFlags>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum SubprocessFlags extends Enum<SubprocessFlags> implements Enumeration

Flags to define the behaviour of a GSubprocess.

Note that the default for stdin is to redirect from /dev/null. For stdout and stderr the default are for them to inherit the corresponding descriptor from the calling process.

Note that it is a programmer error to mix 'incompatible' flags. For example, you may not request both STDOUT_PIPE and STDOUT_SILENCE.

Since:
2.40
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    spawned processes will inherit the file descriptors of their parent, unless those descriptors have been explicitly marked as close-on-exec.
    No flags.
    if path searching is needed when spawning the subprocess, use the PATH in the launcher environment.
    merge the stderr of the spawned process with whatever the stdout happens to be.
    create a pipe for the stderr of the spawned process that can be accessed with g_subprocess_get_stderr_pipe().
    silence the stderr of the spawned process (ie: redirect to /dev/null).
    stdin is inherited from the calling process.
    create a pipe for the stdin of the spawned process that can be accessed with g_subprocess_get_stdin_pipe().
    create a pipe for the stdout of the spawned process that can be accessed with g_subprocess_get_stdout_pipe().
    silence the stdout of the spawned process (ie: redirect to /dev/null).
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable Type
    Get the GType of the SubprocessFlags class.
    int
    Get the numeric value of this enum
    of(int flags)
    Create a new EnumSet<SubprocessFlags> for the provided bitfield
    of(MemorySegment address)
    Create a new EnumSet<SubprocessFlags> for the bitfield in the provided memory address.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NONE

      public static final SubprocessFlags NONE
      No flags.
    • STDIN_PIPE

      public static final SubprocessFlags STDIN_PIPE
      create a pipe for the stdin of the spawned process that can be accessed with g_subprocess_get_stdin_pipe().
    • STDIN_INHERIT

      public static final SubprocessFlags STDIN_INHERIT
      stdin is inherited from the calling process.
    • STDOUT_PIPE

      public static final SubprocessFlags STDOUT_PIPE
      create a pipe for the stdout of the spawned process that can be accessed with g_subprocess_get_stdout_pipe().
    • STDOUT_SILENCE

      public static final SubprocessFlags STDOUT_SILENCE
      silence the stdout of the spawned process (ie: redirect to /dev/null).
    • STDERR_PIPE

      public static final SubprocessFlags STDERR_PIPE
      create a pipe for the stderr of the spawned process that can be accessed with g_subprocess_get_stderr_pipe().
    • STDERR_SILENCE

      public static final SubprocessFlags STDERR_SILENCE
      silence the stderr of the spawned process (ie: redirect to /dev/null).
    • STDERR_MERGE

      public static final SubprocessFlags STDERR_MERGE
      merge the stderr of the spawned process with whatever the stdout happens to be. This is a good way of directing both streams to a common log file, for example.
    • INHERIT_FDS

      public static final SubprocessFlags INHERIT_FDS
      spawned processes will inherit the file descriptors of their parent, unless those descriptors have been explicitly marked as close-on-exec. This flag has no effect over the "standard" file descriptors (stdin, stdout, stderr).
    • SEARCH_PATH_FROM_ENVP

      public static final SubprocessFlags SEARCH_PATH_FROM_ENVP
      if path searching is needed when spawning the subprocess, use the PATH in the launcher environment. (Since: 2.72)
  • Method Details

    • values

      public static SubprocessFlags[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SubprocessFlags valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static Set<SubprocessFlags> of(int flags)
      Create a new EnumSet<SubprocessFlags> for the provided bitfield
      Parameters:
      flags - the SubprocessFlags bitfield
      Returns:
      the EnumSet for the provided bitfield
    • of

      public static Set<SubprocessFlags> of(MemorySegment address)
      Create a new EnumSet<SubprocessFlags> for the bitfield in the provided memory address.
      Parameters:
      address - the memory address holding a bitfield value
      Returns:
      the EnumSet for the bitfield in the provided memory address
    • getType

      public static @Nullable Type getType()
      Get the GType of the SubprocessFlags class.
      Returns:
      the GType