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

Implement &| stdout and stderr piping #368

Merged
merged 17 commits into from
Jul 7, 2017
Merged

Implement &| stdout and stderr piping #368

merged 17 commits into from
Jul 7, 2017

Conversation

hgoldstein
Copy link
Contributor

Changes introduced by this pull request:

  • &| is now part of the grammar as the stdout and stderr piping operator
  • Redirecting stdout and stderr with &| is now supported on *nix and Redox

Drawbacks:

  • The big crossplat module is a little messy. Perhaps moving all of the platform specific code to a separate file altogether would be better. It seems like Rust's pattern for this is something like:
#[cfg(windows), path = 'for_windows.rs']
mod some_functionality;

#[cfg(unix), path = 'for_unix.rs']
mod some_functionality;

...

Fixes: Closes #331

State: Ready to go, pending review.

@mmstick
Copy link
Contributor

mmstick commented Jul 7, 2017

Thanks for the work! I'm about to land some big changes myself to the pipe logic -- process groups, signal masking, foreground management. Albeit, I've yet to figure out why my fg implementation isn't working. Perhaps has something to do with performing waitpid in a background thread, and then the foreground process needing to take control of and perform waitpid itself.

@mmstick mmstick merged commit 9d5cb19 into redox-os:master Jul 7, 2017
@hgoldstein hgoldstein deleted the stdout_and_stderr_redirect branch July 7, 2017 00:46
@mmstick
Copy link
Contributor

mmstick commented Jul 7, 2017

And merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants