Package org.gnome.glib
Enum Class SpawnFlags
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<SpawnFlags>
,Constable
@Generated("io.github.jwharm.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 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe 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 theO_CLOEXEC
flag set.no flags, default behaviourthe child will not be automatically reaped; you must use g_child_watch_add() yourself (or call waitpid() or handleSIGCHLD
yourself), or the child will become a zombie.the first element ofargv
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'sPATH
.ifargv[0]
is not an absolute path, it will be looked for in thePATH
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 TypeMethodDescriptionint
getValue()
Get the numeric value of this enumstatic SpawnFlags
of
(int value) Create a new SpawnFlags for the provided valuestatic SpawnFlags
Returns the enum constant of this class with the specified name.static SpawnFlags[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
no flags, default behaviour -
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
the child will not be automatically reaped; you must use g_child_watch_add() yourself (or call waitpid() or handleSIGCHLD
yourself), or the child will become a zombie. -
SEARCH_PATH
argv[0]
need not be an absolute path, it will be looked for in the user'sPATH
. -
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
the child's standard error will be discarded. -
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
the first element ofargv
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() usesargv[0]
as the file to execute, and passes all ofargv
to the child. -
SEARCH_PATH_FROM_ENVP
ifargv[0]
is not an absolute path, it will be looked for in thePATH
from the passed child environment. Since: 2.34 -
CLOEXEC_PIPES
create all pipes with theO_CLOEXEC
flag set. Since: 2.40 -
CHILD_INHERITS_STDOUT
The child will inherit the parent's standard output. -
CHILD_INHERITS_STDERR
The child will inherit the parent's standard error. -
STDIN_FROM_DEV_NULL
The child's standard input is attached to/dev/null
.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
of
Create a new SpawnFlags for the provided value- Parameters:
value
- the bitfield value- Returns:
- the bitfield for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-