Enum Class SpawnFlags

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

@Generated("org.javagi.JavaGI") public enum SpawnFlags extends Enum<SpawnFlags> implements Enumeration
Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes().
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The child will inherit the parent's standard error.
    the child will inherit the parent's standard input (by default, the child's standard input is attached to /dev/null).
    The child will inherit the parent's standard output.
    create all pipes with the O_CLOEXEC flag set.
    no flags, default behaviour
    the child will not be automatically reaped; you must use g_child_watch_add() yourself (or call waitpid() or handle SIGCHLD yourself), or the child will become a zombie.
    the first element of argv is the file to execute, while the remaining elements are the actual argument vector to pass to the file.
    the parent's open file descriptors will be inherited by the child; otherwise all descriptors except stdin, stdout and stderr will be closed before calling exec() in the child.
    argv[0] need not be an absolute path, it will be looked for in the user's PATH.
    if argv[0] is not an absolute path, it will be looked for in the PATH from the passed child environment.
    the child's standard error will be discarded.
    The child's standard input is attached to /dev/null.
    the child's standard output will be discarded, instead of going to the same location as the parent's standard output.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the numeric value of this enum
    static Set<SpawnFlags>
    of(int flags)
    Create a new EnumSet<SpawnFlags> for the provided bitfield
    static Set<SpawnFlags>
    of(MemorySegment address)
    Create a new EnumSet<SpawnFlags> for the bitfield in the provided memory address.
    static SpawnFlags
    Returns the enum constant of this class with the specified name.
    static SpawnFlags[]
    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

    • DEFAULT

      public static final SpawnFlags DEFAULT
      no flags, default behaviour
    • LEAVE_DESCRIPTORS_OPEN

      public static final SpawnFlags LEAVE_DESCRIPTORS_OPEN
      the parent's open file descriptors will be inherited by the child; otherwise all descriptors except stdin, stdout and stderr will be closed before calling exec() in the child.
    • DO_NOT_REAP_CHILD

      public static final SpawnFlags DO_NOT_REAP_CHILD
      the child will not be automatically reaped; you must use g_child_watch_add() yourself (or call waitpid() or handle SIGCHLD yourself), or the child will become a zombie.
    • SEARCH_PATH

      public static final SpawnFlags SEARCH_PATH
      argv[0] need not be an absolute path, it will be looked for in the user's PATH.
    • STDOUT_TO_DEV_NULL

      public static final SpawnFlags STDOUT_TO_DEV_NULL
      the child's standard output will be discarded, instead of going to the same location as the parent's standard output.
    • STDERR_TO_DEV_NULL

      public static final SpawnFlags STDERR_TO_DEV_NULL
      the child's standard error will be discarded.
    • CHILD_INHERITS_STDIN

      public static final SpawnFlags CHILD_INHERITS_STDIN
      the child will inherit the parent's standard input (by default, the child's standard input is attached to /dev/null).
    • FILE_AND_ARGV_ZERO

      public static final SpawnFlags FILE_AND_ARGV_ZERO
      the first element of argv is the file to execute, while the remaining elements are the actual argument vector to pass to the file. Normally g_spawn_async_with_pipes() uses argv[0] as the file to execute, and passes all of argv to the child.
    • SEARCH_PATH_FROM_ENVP

      public static final SpawnFlags SEARCH_PATH_FROM_ENVP
      if argv[0] is not an absolute path, it will be looked for in the PATH from the passed child environment. Since: 2.34
    • CLOEXEC_PIPES

      public static final SpawnFlags CLOEXEC_PIPES
      create all pipes with the O_CLOEXEC flag set. Since: 2.40
    • CHILD_INHERITS_STDOUT

      public static final SpawnFlags CHILD_INHERITS_STDOUT
      The child will inherit the parent's standard output.
      Since:
      2.74
    • CHILD_INHERITS_STDERR

      public static final SpawnFlags CHILD_INHERITS_STDERR
      The child will inherit the parent's standard error.
      Since:
      2.74
    • STDIN_FROM_DEV_NULL

      public static final SpawnFlags STDIN_FROM_DEV_NULL
      The child's standard input is attached to /dev/null.
      Since:
      2.74
  • Method Details

    • values

      public static SpawnFlags[] 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 SpawnFlags 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<SpawnFlags> of(int flags)
      Create a new EnumSet<SpawnFlags> for the provided bitfield
      Parameters:
      flags - the SpawnFlags bitfield
      Returns:
      the EnumSet for the provided bitfield
    • of

      public static Set<SpawnFlags> of(MemorySegment address)
      Create a new EnumSet<SpawnFlags> 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