Function glib::spawn_async_with_fds[][src]

pub fn spawn_async_with_fds<P: AsRef<Path>, T: AsRawFd, U: AsRawFd, V: AsRawFd>(
    working_directory: P,
    argv: &[&str],
    envp: &[&str],
    flags: SpawnFlags,
    child_setup: Option<Box_<dyn FnOnce() + 'static>>,
    stdin_fd: T,
    stdout_fd: U,
    stderr_fd: V
) -> Result<Pid, Error>
This is supported on crate feature v2_58 and non-Windows only.
Expand description

Identical to g_spawn_async_with_pipes_and_fds() but with n_fds set to zero, so no FD assignments are used.

working_directory

child’s current working directory, or None to inherit parent’s, in the GLib file name encoding

argv

child’s argument vector, in the GLib file name encoding

envp

child’s environment, or None to inherit parent’s, in the GLib file name encoding

flags

flags from SpawnFlags

child_setup

function to run in the child just before exec()

stdin_fd

file descriptor to use for child’s stdin, or -1

stdout_fd

file descriptor to use for child’s stdout, or -1

stderr_fd

file descriptor to use for child’s stderr, or -1

Returns

true on success, false if an error was set

child_pid

return location for child process ID, or None