Function

Shell-18Shellutil_spawn_async_with_pipes

  • A wrapper around g_spawn_async_with_pipes() with async-signal-safe implementation of GLib.SpawnChildSetupFunc to launch a child program asynchronously resetting the rlimit nofile on child setup.

    Parameters

    • working_directory: string | null

      child's current working directory, or null to inherit parent's

    • argv: string[]

      child's argument vector

    • envp: string[] | null

      child's environment, or null to inherit parent's

    • flags: GLib.SpawnFlags

      flags from GLib.SpawnFlags

    Returns [number, number, number, number]

    the PID of the child on success, 0 if error is set