![]() |
![]() |
![]() |
![]() |
These functions let applications spawn a process in another copy of their sandbox.
To monitor spawned processes, use the “spawn-exited” signal.
The underlying portal is org.freedesktop.portal.Flatpak.
void xdp_portal_spawn (XdpPortal *portal
,const char *cwd
,const char * const *argv
,int *fds
,int *map_to
,int n_fds
,const char * const *env
,XdpSpawnFlags flags
,const char * const *sandbox_expose
,const char * const *sandbox_expose_ro
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer data
);
Creates a new copy of the applications sandbox, and runs a process in, with the given arguments.
The learn when the spawned process exits, connect to the “spawn-exited” signal.
portal |
||
cwd |
the cwd for the new process |
|
argv |
the argv for the new process. |
[array zero-terminated] |
fds |
an array of open fds to pass to the new process, or |
[array length=n_fds][nullable] |
map_to |
an array of integers to map the |
[array length=n_fds][nullable] |
n_fds |
the length of |
|
env |
an array of KEY=VALUE environment settings, or |
[array zero-terminated][nullable] |
flags |
flags influencing the spawn operation |
|
sandbox_expose |
paths to expose rw in the new sandbox, or |
[array zero-terminated][nullable] |
sandbox_expose_ro |
paths to expose ro in the new sandbox, or |
[array zero-terminated][nullable] |
cancellable |
optional GCancellable. |
[nullable] |
callback |
a callback to call when the request is done. |
[scope async] |
data |
data to pass to |
[closure] |
pid_t xdp_portal_spawn_finish (XdpPortal *portal
,GAsyncResult *result
,GError **error
);
Finishes the spawn request, and returns the pid of the newly spawned process.
void xdp_portal_spawn_signal (XdpPortal *portal
,pid_t pid
,int signal
,gboolean to_process_group
);
Sends a Unix signal to a process that has been spawned
by xdp_portal_spawn()
.
Flags influencing the spawn operation and how the new sandbox is created.