Skip to content

API for spawning sub-processes #126

@talex5

Description

@talex5

Eio needs to provide a way to create and manage sub-processes (like Lwt_process).

  • Must work in programs using multiple domains. Note that Unix.fork cannot be used there.
  • API should try to prevent bugs with argument splitting (e.g. avoid error-prone Unix.system style API by default). But also needs to work on Windows, where I think you can't provide an argv.
  • Child processes should be attached to a switch by default to avoid leaking them, but need a way to spawn detached sub-processes too.
  • Must allow passing pipes, etc, to child processes.
  • Must prevent accidentally leaking FDs to child processes. All FDs in Eio are already opened with close-on-exec set for this reason.
  • Should provide a simple way to check or report the process's exit status.

Possible sources of inspiration include:

Current status:

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiAPI design decision

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions