Function

GLib-2.0GLibspawn_async_with_fdsSince 2.58

  • Executes a child program asynchronously.

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

    Parameters

    • working_directory: string

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

    • argv: string[]

      child's argument vector, in the GLib file name encoding; it must be non-empty and null-terminated

    • envp: string[]

      child's environment, or null to inherit parent's, in the GLib file name encoding

    • flags: GLib.SpawnFlags

      flags from GLib.SpawnFlags

    • child_setup: SpawnChildSetupFunc

      function to run in the child just before exec()

    • stdin_fd: number

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

    • stdout_fd: number

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

    • stderr_fd: number

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

    Returns [boolean, number]

    true on success, false if an error was set

    2.58