Class Subprocess
- Namespace
- Gio
- Assembly
- Gio-2.0.dll
public class Subprocess : Object, Initable, NativeObject, IDisposable, GTypeProvider, InstanceFactory
- Inheritance
-
Subprocess
- Implements
- Inherited Members
Constructors
Subprocess(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public Subprocess(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
Subprocess(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected Subprocess(CreationData data)
Parameters
dataCreationData
Subprocess(SubprocessHandle)
protected Subprocess(SubprocessHandle handle)
Parameters
handleSubprocessHandle
Methods
Communicate(Bytes?, Cancellable?, out Bytes?, out Bytes?)
[Version("2.40")]
public bool Communicate(Bytes? stdinBuf, Cancellable? cancellable, out Bytes? stdoutBuf, out Bytes? stderrBuf)
Parameters
stdinBufBytescancellableCancellablestdoutBufBytesstderrBufBytes
Returns
Exceptions
- GException
Throws a GException in case of an error.
CommunicateFinish(AsyncResult, out Bytes?, out Bytes?)
public bool CommunicateFinish(AsyncResult result, out Bytes? stdoutBuf, out Bytes? stderrBuf)
Parameters
resultAsyncResultstdoutBufBytesstderrBufBytes
Returns
Exceptions
- GException
Throws a GException in case of an error.
CommunicateUtf8(string?, Cancellable?, out string?, out string?)
public bool CommunicateUtf8(string? stdinBuf, Cancellable? cancellable, out string? stdoutBuf, out string? stderrBuf)
Parameters
stdinBufstringcancellableCancellablestdoutBufstringstderrBufstring
Returns
Exceptions
- GException
Throws a GException in case of an error.
CommunicateUtf8Finish(AsyncResult, out string?, out string?)
public bool CommunicateUtf8Finish(AsyncResult result, out string? stdoutBuf, out string? stderrBuf)
Parameters
resultAsyncResultstdoutBufstringstderrBufstring
Returns
Exceptions
- GException
Throws a GException in case of an error.
ForceExit()
[Version("2.40")]
public void ForceExit()
GetExitStatus()
[Version("2.40")]
public int GetExitStatus()
Returns
GetGType()
public static Type GetGType()
Returns
GetIdentifier()
[Version("2.40")]
public string? GetIdentifier()
Returns
GetIfExited()
[Version("2.40")]
public bool GetIfExited()
Returns
GetIfSignaled()
[Version("2.40")]
public bool GetIfSignaled()
Returns
GetStatus()
[Version("2.40")]
public int GetStatus()
Returns
GetStderrPipe()
[Version("2.40")]
public InputStream? GetStderrPipe()
Returns
GetStdinPipe()
[Version("2.40")]
public OutputStream? GetStdinPipe()
Returns
GetStdoutPipe()
[Version("2.40")]
public InputStream? GetStdoutPipe()
Returns
GetSuccessful()
[Version("2.40")]
public bool GetSuccessful()
Returns
GetTermSig()
[Version("2.40")]
public int GetTermSig()
Returns
Init(Cancellable?)
[Version("2.22")]
public bool Init(Cancellable? cancellable)
Parameters
cancellableCancellable
Returns
Exceptions
- GException
Throws a GException in case of an error.
New(string[], SubprocessFlags)
[Version("2.40")]
public static Subprocess New(string[] argv, SubprocessFlags flags)
Parameters
argvstring[]flagsSubprocessFlags
Returns
NewFromPointer(nint, bool)
Creates a new managed Subprocess instance for a given pointer.
public static Subprocess NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new Subprocess and sets the properties specified by the construct arguments.
public static Subprocess NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
SendSignal(int)
[Version("2.40")]
public void SendSignal(int signalNum)
Parameters
signalNumint
Wait(Cancellable?)
[Version("2.40")]
public bool Wait(Cancellable? cancellable)
Parameters
cancellableCancellable
Returns
Exceptions
- GException
Throws a GException in case of an error.
WaitCheck(Cancellable?)
[Version("2.40")]
public bool WaitCheck(Cancellable? cancellable)
Parameters
cancellableCancellable
Returns
Exceptions
- GException
Throws a GException in case of an error.
WaitCheckFinish(AsyncResult)
[Version("2.40")]
public bool WaitCheckFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
Exceptions
- GException
Throws a GException in case of an error.
WaitFinish(AsyncResult)
[Version("2.40")]
public bool WaitFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
Exceptions
- GException
Throws a GException in case of an error.