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

Implementing shell environment #5

Open
22 of 29 tasks
Tracked by #41
magicant opened this issue Feb 9, 2021 · 2 comments
Open
22 of 29 tasks
Tracked by #41

Implementing shell environment #5

magicant opened this issue Feb 9, 2021 · 2 comments
Labels
tracker List of subtasks

Comments

@magicant
Copy link
Owner

magicant commented Feb 9, 2021

This is a tracking issue for implementation of shell environment.

Items

Items marked * are defined in POSIX.

Possible optimizations

  • Virtual subshell: executing a synchronous subshell in the current process rather than in a child process
@magicant magicant mentioned this issue May 15, 2021
26 tasks
@magicant magicant added the tracker List of subtasks label Jun 27, 2021
@magicant
Copy link
Owner Author

It may be helpful to have a set of internally used file descriptors as one of application-managed attributes. Such FDs can be redirections' saved FD, pipes for sending here-document contents, interactive shell's tty, etc.
Such FDs are invisible from the user, so they must move to other unused FDs when the user performs redirections on them. We can use Rc<Cell<Fd>> to keep track of where these FDs moved.

@magicant
Copy link
Owner Author

magicant commented Jan 12, 2023

The CLOEXEC flag indicates whether an FD is internal, so we don't necessarily need an FD set.
We don't have to think about FDs moving as long as we don't support overwriting internal FDs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracker List of subtasks
Projects
None yet
Development

No branches or pull requests

1 participant