Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating subshells #60

Merged
merged 8 commits into from
Jul 5, 2021
Merged

Creating subshells #60

merged 8 commits into from
Jul 5, 2021

Conversation

magicant
Copy link
Owner

@magicant magicant commented Jul 3, 2021

  • Define System::fork function
  • Implement System::fork for RealSystem
  • Implement System::fork for VirtualSystem
  • Define System::wait function
  • Implement System::wait for RealSystem
    • TODO: In this pull request, wait will be blocking, but eventually it should be non-blocking.
  • Implement System::wait for VirtualSystem
  • Add JobSet to Env
  • Implement Env::run_in_subshell
    • TODO: Update control flow state in the subshell

The signature of the System trait is going on to depend on types defined
in the nix crate. It is no longer helpful to support disabling the
real-system feature and the nix crate.
@magicant magicant self-assigned this Jul 3, 2021
@magicant magicant mentioned this pull request Jul 3, 2021
4 tasks
@magicant
Copy link
Owner Author

magicant commented Jul 3, 2021

Implement Env::run_in_subshell

The run_in_subshell function starts a subshell and waits for it to finish. This function cannot be used for an asynchronous subshell or job-controlled process.

POSIX defines the exit status as a signed integer. See exit(3p).
@magicant magicant marked this pull request as ready for review July 5, 2021 01:59
@magicant
Copy link
Owner Author

magicant commented Jul 5, 2021

JobEnv was not necessary for the goal of this pull request, but it won't do any harm anyway...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant