Top | ![]() |
![]() |
![]() |
![]() |
gboolean | clean-env | Read / Write |
gchar * | cwd | Read / Write |
GStrv | environ | Read / Write |
GSubprocessFlags | flags | Read / Write / Construct |
gboolean | run-on-host | Read / Write |
IdeSubprocessLauncher *
ide_subprocess_launcher_new (GSubprocessFlags flags
);
const gchar *
ide_subprocess_launcher_get_cwd (IdeSubprocessLauncher *self
);
void ide_subprocess_launcher_set_cwd (IdeSubprocessLauncher *self
,const gchar *cwd
);
GSubprocessFlags
ide_subprocess_launcher_get_flags (IdeSubprocessLauncher *self
);
void ide_subprocess_launcher_set_flags (IdeSubprocessLauncher *self
,GSubprocessFlags flags
);
gboolean
ide_subprocess_launcher_get_run_on_host
(IdeSubprocessLauncher *self
);
Gets if the process should be executed on the host system. This might be useful for situations where running in a contained environment is not sufficient to perform the given task.
Currently, only flatpak is supported for breaking out of the containment zone and requires the application was built with --allow=devel.
void ide_subprocess_launcher_set_run_on_host (IdeSubprocessLauncher *self
,gboolean run_on_host
);
Sets the “run-on-host” property. See
ide_subprocess_launcher_get_run_on_host()
for more information.
void ide_subprocess_launcher_append_path (IdeSubprocessLauncher *self
,const gchar *append_path
);
gboolean
ide_subprocess_launcher_get_clear_env (IdeSubprocessLauncher *self
);
void ide_subprocess_launcher_set_clear_env (IdeSubprocessLauncher *self
,gboolean clear_env
);
const gchar * const *
ide_subprocess_launcher_get_environ (IdeSubprocessLauncher *self
);
void ide_subprocess_launcher_set_environ (IdeSubprocessLauncher *self
,const gchar * const *environ_
);
Replace the environment variables by a new list of variables.
const gchar * ide_subprocess_launcher_getenv (IdeSubprocessLauncher *self
,const gchar *key
);
void ide_subprocess_launcher_setenv (IdeSubprocessLauncher *self
,const gchar *key
,const gchar *value
,gboolean replace
);
void ide_subprocess_launcher_insert_argv (IdeSubprocessLauncher *self
,guint index
,const gchar *arg
);
void ide_subprocess_launcher_replace_argv (IdeSubprocessLauncher *self
,guint index
,const gchar *arg
);
void ide_subprocess_launcher_overlay_environment (IdeSubprocessLauncher *self
,IdeEnvironment *environment
);
const gchar * const *
ide_subprocess_launcher_get_argv (IdeSubprocessLauncher *self
);
void ide_subprocess_launcher_push_args (IdeSubprocessLauncher *self
,const gchar * const *args
);
This function is semantically identical to calling ide_subprocess_launcher_push_argv()
for each element of args
.
If args
is NULL
, this function does nothing.
void ide_subprocess_launcher_push_argv (IdeSubprocessLauncher *self
,const gchar *argv
);
gchar *
ide_subprocess_launcher_pop_argv (IdeSubprocessLauncher *self
);
void ide_subprocess_launcher_set_argv (IdeSubprocessLauncher *self
,const gchar * const *argv
);
IdeSubprocess * ide_subprocess_launcher_spawn (IdeSubprocessLauncher *self
,GCancellable *cancellable
,GError **error
);
Synchronously spawn a process using the internal state.
void ide_subprocess_launcher_set_stdout_file_path (IdeSubprocessLauncher *self
,const gchar *stdout_file_path
);
void ide_subprocess_launcher_take_fd (IdeSubprocessLauncher *self
,gint source_fd
,gint dest_fd
);
void ide_subprocess_launcher_take_stdin_fd (IdeSubprocessLauncher *self
,gint stdin_fd
);
void ide_subprocess_launcher_take_stdout_fd (IdeSubprocessLauncher *self
,gint stdout_fd
);
void ide_subprocess_launcher_take_stderr_fd (IdeSubprocessLauncher *self
,gint stderr_fd
);
#define IDE_TYPE_SUBPROCESS_LAUNCHER (ide_subprocess_launcher_get_type())
struct IdeSubprocessLauncherClass { GObjectClass parent_class; IdeSubprocess *(*spawn) (IdeSubprocessLauncher *self, GCancellable *cancellable, GError **error); };