gi-gio
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.Subprocess

Description

GSubprocess allows the creation of and interaction with child processes.

Processes can be communicated with using standard GIO-style APIs (ie: InputStream, OutputStream). There are GIO-style APIs to wait for process termination (ie: cancellable and with an asynchronous variant).

There is an API to force a process to terminate, as well as a race-free API for sending UNIX signals to a subprocess.

One major advantage that GIO brings over the core GLib library is comprehensive API for asynchronous I/O, such outputStreamSpliceAsync. This makes GSubprocess significantly more powerful and flexible than equivalent APIs in some other languages such as the subprocess.py included with Python. For example, using GSubprocess one could create two child processes, reading standard output from the first, processing it, and writing to the input stream of the second, all without blocking the main loop.

A powerful subprocessCommunicate API is provided similar to the communicate() method of subprocess.py. This enables very easy interaction with a subprocess that has been opened with pipes.

GSubprocess defaults to tight control over the file descriptors open in the child process, avoiding dangling-FD issues that are caused by a simple fork()/exec(). The only open file descriptors in the spawned process are ones that were explicitly specified by the GSubprocess API (unless G_SUBPROCESS_FLAGS_INHERIT_FDS was specified).

GSubprocess will quickly reap all child processes as they exit, avoiding ‘zombie processes’ remaining around for long periods of time. subprocessWait can be used to wait for this to happen, but it will happen even without the call being explicitly made.

As a matter of principle, GSubprocess has no API that accepts shell-style space-separated strings. It will, however, match the typical shell behaviour of searching the PATH for executables that do not contain a directory separator in their name. By default, the PATH of the current process is used. You can specify G_SUBPROCESS_FLAGS_SEARCH_PATH_FROM_ENVP to use the PATH of the launcher environment instead.

GSubprocess attempts to have a very simple API for most uses (ie: spawning a subprocess with arguments and support for most typical kinds of input and output redirection). See subprocessNew. The SubprocessLauncher API is provided for more complicated cases (advanced types of redirection, environment variable manipulation, change of working directory, child setup functions, etc).

A typical use of GSubprocess will involve calling subprocessNew, followed by subprocessWaitAsync or subprocessWait. After the process exits, the status can be checked using functions such as subprocessGetIfExited (which are similar to the familiar WIFEXITED-style POSIX macros).

Note that as of GLib 2.82, creating a GSubprocess causes the signal SIGPIPE to be ignored for the remainder of the program. If you are writing a command-line utility that uses GSubprocess, you may need to take into account the fact that your program will not automatically be killed if it tries to write to stdout after it has been closed.

Since: 2.40

Synopsis

Exported types

newtype Subprocess Source #

Memory-managed wrapper type.

Instances

Instances details
Eq Subprocess Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

GObject Subprocess Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

ManagedPtrNewtype Subprocess Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

TypedObject Subprocess Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

Methods

glibType :: IO GType #

HasParentTypes Subprocess Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

HasAttributeList Subprocess Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

(info ~ ResolveSubprocessMethod t Subprocess, OverloadedMethod info Subprocess p, HasField t Subprocess p) => HasField (t :: Symbol) Subprocess (p :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

Methods

getField :: Subprocess -> p #

(info ~ ResolveSubprocessMethod t Subprocess, OverloadedMethodInfo info Subprocess) => IsLabel t (MethodProxy info Subprocess) Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

(info ~ ResolveSubprocessMethod t Subprocess, OverloadedMethod info Subprocess p) => IsLabel t (Subprocess -> p) Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

Methods

fromLabel :: Subprocess -> p #

IsGValue (Maybe Subprocess) Source #

Convert Subprocess to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gio.Objects.Subprocess

type AttributeList Subprocess Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type ParentTypes Subprocess Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type SignalList Subprocess Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

class (GObject o, IsDescendantOf Subprocess o) => IsSubprocess o Source #

Type class for types which can be safely cast to Subprocess, for instance with toSubprocess.

Instances

Instances details
(GObject o, IsDescendantOf Subprocess o) => IsSubprocess o Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

toSubprocess :: (MonadIO m, IsSubprocess o) => o -> m Subprocess Source #

Cast to Subprocess, for types for which this is known to be safe. For general casts, use castTo.

Methods

type family ResolveSubprocessMethod (t :: Symbol) o where ... Source #

Equations

ResolveSubprocessMethod "bindProperty" o = ObjectBindPropertyMethodInfo 
ResolveSubprocessMethod "bindPropertyFull" o = ObjectBindPropertyFullMethodInfo 
ResolveSubprocessMethod "communicate" o = SubprocessCommunicateMethodInfo 
ResolveSubprocessMethod "communicateAsync" o = SubprocessCommunicateAsyncMethodInfo 
ResolveSubprocessMethod "communicateFinish" o = SubprocessCommunicateFinishMethodInfo 
ResolveSubprocessMethod "communicateUtf8" o = SubprocessCommunicateUtf8MethodInfo 
ResolveSubprocessMethod "communicateUtf8Async" o = SubprocessCommunicateUtf8AsyncMethodInfo 
ResolveSubprocessMethod "communicateUtf8Finish" o = SubprocessCommunicateUtf8FinishMethodInfo 
ResolveSubprocessMethod "forceExit" o = SubprocessForceExitMethodInfo 
ResolveSubprocessMethod "forceFloating" o = ObjectForceFloatingMethodInfo 
ResolveSubprocessMethod "freezeNotify" o = ObjectFreezeNotifyMethodInfo 
ResolveSubprocessMethod "getv" o = ObjectGetvMethodInfo 
ResolveSubprocessMethod "init" o = InitableInitMethodInfo 
ResolveSubprocessMethod "isFloating" o = ObjectIsFloatingMethodInfo 
ResolveSubprocessMethod "notify" o = ObjectNotifyMethodInfo 
ResolveSubprocessMethod "notifyByPspec" o = ObjectNotifyByPspecMethodInfo 
ResolveSubprocessMethod "ref" o = ObjectRefMethodInfo 
ResolveSubprocessMethod "refSink" o = ObjectRefSinkMethodInfo 
ResolveSubprocessMethod "runDispose" o = ObjectRunDisposeMethodInfo 
ResolveSubprocessMethod "sendSignal" o = SubprocessSendSignalMethodInfo 
ResolveSubprocessMethod "stealData" o = ObjectStealDataMethodInfo 
ResolveSubprocessMethod "stealQdata" o = ObjectStealQdataMethodInfo 
ResolveSubprocessMethod "thawNotify" o = ObjectThawNotifyMethodInfo 
ResolveSubprocessMethod "unref" o = ObjectUnrefMethodInfo 
ResolveSubprocessMethod "wait" o = SubprocessWaitMethodInfo 
ResolveSubprocessMethod "waitAsync" o = SubprocessWaitAsyncMethodInfo 
ResolveSubprocessMethod "waitCheck" o = SubprocessWaitCheckMethodInfo 
ResolveSubprocessMethod "waitCheckAsync" o = SubprocessWaitCheckAsyncMethodInfo 
ResolveSubprocessMethod "waitCheckFinish" o = SubprocessWaitCheckFinishMethodInfo 
ResolveSubprocessMethod "waitFinish" o = SubprocessWaitFinishMethodInfo 
ResolveSubprocessMethod "watchClosure" o = ObjectWatchClosureMethodInfo 
ResolveSubprocessMethod "getData" o = ObjectGetDataMethodInfo 
ResolveSubprocessMethod "getExitStatus" o = SubprocessGetExitStatusMethodInfo 
ResolveSubprocessMethod "getIdentifier" o = SubprocessGetIdentifierMethodInfo 
ResolveSubprocessMethod "getIfExited" o = SubprocessGetIfExitedMethodInfo 
ResolveSubprocessMethod "getIfSignaled" o = SubprocessGetIfSignaledMethodInfo 
ResolveSubprocessMethod "getProperty" o = ObjectGetPropertyMethodInfo 
ResolveSubprocessMethod "getQdata" o = ObjectGetQdataMethodInfo 
ResolveSubprocessMethod "getStatus" o = SubprocessGetStatusMethodInfo 
ResolveSubprocessMethod "getStderrPipe" o = SubprocessGetStderrPipeMethodInfo 
ResolveSubprocessMethod "getStdinPipe" o = SubprocessGetStdinPipeMethodInfo 
ResolveSubprocessMethod "getStdoutPipe" o = SubprocessGetStdoutPipeMethodInfo 
ResolveSubprocessMethod "getSuccessful" o = SubprocessGetSuccessfulMethodInfo 
ResolveSubprocessMethod "getTermSig" o = SubprocessGetTermSigMethodInfo 
ResolveSubprocessMethod "setData" o = ObjectSetDataMethodInfo 
ResolveSubprocessMethod "setDataFull" o = ObjectSetDataFullMethodInfo 
ResolveSubprocessMethod "setProperty" o = ObjectSetPropertyMethodInfo 
ResolveSubprocessMethod l o = MethodResolutionFailed l o :: Type 

communicate

subprocessCommunicate Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) 
=> a

subprocess: a Subprocess

-> Maybe Bytes

stdinBuf: data to send to the stdin of the subprocess, or Nothing

-> Maybe b

cancellable: a Cancellable

-> m (Maybe Bytes, Maybe Bytes)

(Can throw GError)

Communicate with the subprocess until it terminates, and all input and output has been completed.

If stdinBuf is given, the subprocess must have been created with SubprocessFlagsStdinPipe. The given data is fed to the stdin of the subprocess and the pipe is closed (ie: EOF).

At the same time (as not to cause blocking when dealing with large amounts of data), if SubprocessFlagsStdoutPipe or SubprocessFlagsStderrPipe were used, reads from those streams. The data that was read is returned in stdout and/or the stderr.

If the subprocess was created with SubprocessFlagsStdoutPipe, stdoutBuf will contain the data read from stdout. Otherwise, for subprocesses not created with SubprocessFlagsStdoutPipe, stdoutBuf will be set to Nothing. Similar provisions apply to stderrBuf and SubprocessFlagsStderrPipe.

As usual, any output variable may be given as Nothing to ignore it.

If you desire the stdout and stderr data to be interleaved, create the subprocess with SubprocessFlagsStdoutPipe and SubprocessFlagsStderrMerge. The merged result will be returned in stdoutBuf and stderrBuf will be set to Nothing.

In case of any error (including cancellation), False will be returned with error set. Some or all of the stdin data may have been written. Any stdout or stderr data that has been read will be discarded. None of the out variables (aside from error) will have been set to anything in particular and should not be inspected.

In the case that True is returned, the subprocess has exited and the exit status inspection APIs (eg: subprocessGetIfExited, subprocessGetExitStatus) may be used.

You should not attempt to use any of the subprocess pipes after starting this function, since they may be left in strange states, even if the operation was cancelled. You should especially not attempt to interact with the pipes while the operation is in progress (either from another thread or if using the asynchronous version).

Since: 2.40

communicateAsync

subprocessCommunicateAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) 
=> a

subprocess: Self

-> Maybe Bytes

stdinBuf: Input data, or Nothing

-> Maybe b

cancellable: Cancellable

-> Maybe AsyncReadyCallback

callback: Callback

-> m () 

Asynchronous version of subprocessCommunicate. Complete invocation with subprocessCommunicateFinish.

communicateFinish

subprocessCommunicateFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) 
=> a

subprocess: Self

-> b

result: Result

-> m (Maybe Bytes, Maybe Bytes)

(Can throw GError)

Complete an invocation of subprocessCommunicateAsync.

communicateUtf8

subprocessCommunicateUtf8 Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) 
=> a

subprocess: a Subprocess

-> Maybe Text

stdinBuf: data to send to the stdin of the subprocess, or Nothing

-> Maybe b

cancellable: a Cancellable

-> m (Maybe Text, Maybe Text)

(Can throw GError)

Like subprocessCommunicate, but validates the output of the process as UTF-8, and returns it as a regular NUL terminated string.

On error, stdoutBuf and stderrBuf will be set to undefined values and should not be used.

communicateUtf8Async

subprocessCommunicateUtf8Async Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) 
=> a

subprocess: Self

-> Maybe Text

stdinBuf: Input data, or Nothing

-> Maybe b

cancellable: Cancellable

-> Maybe AsyncReadyCallback

callback: Callback

-> m () 

Asynchronous version of subprocessCommunicateUtf8. Complete invocation with subprocessCommunicateUtf8Finish.

communicateUtf8Finish

subprocessCommunicateUtf8Finish Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) 
=> a

subprocess: Self

-> b

result: Result

-> m (Maybe Text, Maybe Text)

(Can throw GError)

Complete an invocation of subprocessCommunicateUtf8Async.

forceExit

data SubprocessForceExitMethodInfo Source #

Instances

Instances details
(signature ~ m (), MonadIO m, IsSubprocess a) => OverloadedMethod SubprocessForceExitMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo SubprocessForceExitMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

subprocessForceExit Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a) 
=> a

subprocess: a Subprocess

-> m () 

Use an operating-system specific method to attempt an immediate, forceful termination of the process. There is no mechanism to determine whether or not the request itself was successful; however, you can use subprocessWait to monitor the status of the process after calling this function.

On Unix, this function sends SIGKILL.

Since: 2.40

getExitStatus

subprocessGetExitStatus Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a) 
=> a

subprocess: a Subprocess

-> m Int32

Returns: the exit status

Check the exit status of the subprocess, given that it exited normally. This is the value passed to the exit() system call or the return value from main.

This is equivalent to the system WEXITSTATUS macro.

It is an error to call this function before subprocessWait and unless subprocessGetIfExited returned True.

Since: 2.40

getIdentifier

subprocessGetIdentifier Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a) 
=> a

subprocess: a Subprocess

-> m (Maybe Text)

Returns: the subprocess identifier, or Nothing if the subprocess has terminated

On UNIX, returns the process ID as a decimal string. On Windows, returns the result of GetProcessId() also as a string. If the subprocess has terminated, this will return Nothing.

Since: 2.40

getIfExited

subprocessGetIfExited Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a) 
=> a

subprocess: a Subprocess

-> m Bool

Returns: True if the case of a normal exit

Check if the given subprocess exited normally (ie: by way of exit() or return from main()).

This is equivalent to the system WIFEXITED macro.

It is an error to call this function before subprocessWait has returned.

Since: 2.40

getIfSignaled

subprocessGetIfSignaled Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a) 
=> a

subprocess: a Subprocess

-> m Bool

Returns: True if the case of termination due to a signal

Check if the given subprocess terminated in response to a signal.

This is equivalent to the system WIFSIGNALED macro.

It is an error to call this function before subprocessWait has returned.

Since: 2.40

getStatus

subprocessGetStatus Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a) 
=> a

subprocess: a Subprocess

-> m Int32

Returns: the (meaningless) waitpid() exit status from the kernel

Gets the raw status code of the process, as from waitpid().

This value has no particular meaning, but it can be used with the macros defined by the system headers such as WIFEXITED. It can also be used with spawnCheckWaitStatus.

It is more likely that you want to use subprocessGetIfExited followed by subprocessGetExitStatus.

It is an error to call this function before subprocessWait has returned.

Since: 2.40

getStderrPipe

subprocessGetStderrPipe Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a) 
=> a

subprocess: a Subprocess

-> m (Maybe InputStream)

Returns: the stderr pipe

Gets the InputStream from which to read the stderr output of subprocess.

The process must have been created with SubprocessFlagsStderrPipe, otherwise Nothing will be returned.

Since: 2.40

getStdinPipe

subprocessGetStdinPipe Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a) 
=> a

subprocess: a Subprocess

-> m (Maybe OutputStream)

Returns: the stdout pipe

Gets the OutputStream that you can write to in order to give data to the stdin of subprocess.

The process must have been created with SubprocessFlagsStdinPipe and not SubprocessFlagsStdinInherit, otherwise Nothing will be returned.

Since: 2.40

getStdoutPipe

subprocessGetStdoutPipe Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a) 
=> a

subprocess: a Subprocess

-> m (Maybe InputStream)

Returns: the stdout pipe

Gets the InputStream from which to read the stdout output of subprocess.

The process must have been created with SubprocessFlagsStdoutPipe, otherwise Nothing will be returned.

Since: 2.40

getSuccessful

subprocessGetSuccessful Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a) 
=> a

subprocess: a Subprocess

-> m Bool

Returns: True if the process exited cleanly with a exit status of 0

Checks if the process was "successful". A process is considered successful if it exited cleanly with an exit status of 0, either by way of the exit() system call or return from main().

It is an error to call this function before subprocessWait has returned.

Since: 2.40

getTermSig

subprocessGetTermSig Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a) 
=> a

subprocess: a Subprocess

-> m Int32

Returns: the signal causing termination

Get the signal number that caused the subprocess to terminate, given that it terminated due to a signal.

This is equivalent to the system WTERMSIG macro.

It is an error to call this function before subprocessWait and unless subprocessGetIfSignaled returned True.

Since: 2.40

new

subprocessNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [[Char]]

argv: commandline arguments for the subprocess

-> [SubprocessFlags]

flags: flags that define the behaviour of the subprocess

-> m Subprocess

Returns: A newly created Subprocess, or Nothing on error (and error will be set) (Can throw GError)

Create a new process with the given flags and argument list.

The argument list is expected to be Nothing-terminated.

Since: 2.40

sendSignal

data SubprocessSendSignalMethodInfo Source #

Instances

Instances details
(signature ~ (Int32 -> m ()), MonadIO m, IsSubprocess a) => OverloadedMethod SubprocessSendSignalMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo SubprocessSendSignalMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

subprocessSendSignal Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a) 
=> a

subprocess: a Subprocess

-> Int32

signalNum: the signal number to send

-> m () 

Sends the UNIX signal signalNum to the subprocess, if it is still running.

This API is race-free. If the subprocess has terminated, it will not be signalled.

This API is not available on Windows.

Since: 2.40

wait

data SubprocessWaitMethodInfo Source #

Instances

Instances details
(signature ~ (Maybe b -> m ()), MonadIO m, IsSubprocess a, IsCancellable b) => OverloadedMethod SubprocessWaitMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo SubprocessWaitMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

subprocessWait Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) 
=> a

subprocess: a Subprocess

-> Maybe b

cancellable: a Cancellable

-> m ()

(Can throw GError)

Synchronously wait for the subprocess to terminate.

After the process terminates you can query its exit status with functions such as subprocessGetIfExited and subprocessGetExitStatus.

This function does not fail in the case of the subprocess having abnormal termination. See subprocessWaitCheck for that.

Cancelling cancellable doesn't kill the subprocess. Call subprocessForceExit if it is desirable.

Since: 2.40

waitAsync

subprocessWaitAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) 
=> a

subprocess: a Subprocess

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the operation is complete

-> m () 

Wait for the subprocess to terminate.

This is the asynchronous version of subprocessWait.

Since: 2.40

waitCheck

data SubprocessWaitCheckMethodInfo Source #

Instances

Instances details
(signature ~ (Maybe b -> m ()), MonadIO m, IsSubprocess a, IsCancellable b) => OverloadedMethod SubprocessWaitCheckMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo SubprocessWaitCheckMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

subprocessWaitCheck Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) 
=> a

subprocess: a Subprocess

-> Maybe b

cancellable: a Cancellable

-> m ()

(Can throw GError)

Combines subprocessWait with spawnCheckWaitStatus.

Since: 2.40

waitCheckAsync

subprocessWaitCheckAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) 
=> a

subprocess: a Subprocess

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the operation is complete

-> m () 

Combines subprocessWaitAsync with spawnCheckWaitStatus.

This is the asynchronous version of subprocessWaitCheck.

Since: 2.40

waitCheckFinish

subprocessWaitCheckFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) 
=> a

subprocess: a Subprocess

-> b

result: the AsyncResult passed to your AsyncReadyCallback

-> m ()

(Can throw GError)

Collects the result of a previous call to subprocessWaitCheckAsync.

Since: 2.40

waitFinish

data SubprocessWaitFinishMethodInfo Source #

Instances

Instances details
(signature ~ (b -> m ()), MonadIO m, IsSubprocess a, IsAsyncResult b) => OverloadedMethod SubprocessWaitFinishMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo SubprocessWaitFinishMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

subprocessWaitFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) 
=> a

subprocess: a Subprocess

-> b

result: the AsyncResult passed to your AsyncReadyCallback

-> m ()

(Can throw GError)

Collects the result of a previous call to subprocessWaitAsync.

Since: 2.40

Properties

argv

Argument vector.

Since: 2.40

data SubprocessArgvPropertyInfo Source #

Instances

Instances details
AttrInfo SubprocessArgvPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrAllowedOps SubprocessArgvPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrBaseTypeConstraint SubprocessArgvPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrGetType SubprocessArgvPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrLabel SubprocessArgvPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrOrigin SubprocessArgvPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrSetTypeConstraint SubprocessArgvPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrTransferType SubprocessArgvPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrTransferTypeConstraint SubprocessArgvPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

constructSubprocessArgv :: (IsSubprocess o, MonadIO m) => [Text] -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “argv” property. This is rarely needed directly, but it is used by new.

flags

Subprocess flags.

Since: 2.40

data SubprocessFlagsPropertyInfo Source #

Instances

Instances details
AttrInfo SubprocessFlagsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrAllowedOps SubprocessFlagsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrBaseTypeConstraint SubprocessFlagsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrGetType SubprocessFlagsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrLabel SubprocessFlagsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrOrigin SubprocessFlagsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrSetTypeConstraint SubprocessFlagsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrTransferType SubprocessFlagsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

type AttrTransferTypeConstraint SubprocessFlagsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.Subprocess

constructSubprocessFlags :: (IsSubprocess o, MonadIO m) => [SubprocessFlags] -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “flags” property. This is rarely needed directly, but it is used by new.