Package org.gnome.gio
Enum Class SubprocessFlags
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<SubprocessFlags>
,Constable
@Generated("io.github.jwharm.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
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionspawned 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 thePATH
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 TypeMethodDescriptionstatic Type
getType()
Get the GType of the SubprocessFlags classint
getValue()
Get the numeric value of this enumstatic SubprocessFlags
of
(int value) Create a new SubprocessFlags for the provided valuestatic SubprocessFlags
Returns the enum constant of this class with the specified name.static SubprocessFlags[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No flags. -
STDIN_PIPE
create a pipe for the stdin of the spawned process that can be accessed with g_subprocess_get_stdin_pipe(). -
STDIN_INHERIT
stdin is inherited from the calling process. -
STDOUT_PIPE
create a pipe for the stdout of the spawned process that can be accessed with g_subprocess_get_stdout_pipe(). -
STDOUT_SILENCE
silence the stdout of the spawned process (ie: redirect to/dev/null
). -
STDERR_PIPE
create a pipe for the stderr of the spawned process that can be accessed with g_subprocess_get_stderr_pipe(). -
STDERR_SILENCE
silence the stderr of the spawned process (ie: redirect to/dev/null
). -
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
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
if path searching is needed when spawning the subprocess, use thePATH
in the launcher environment. (Since: 2.72)
-
-
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 SubprocessFlags 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
-
getType
-