-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
timeout: add all signal handlers, pass on signals to child, add ignored signal handling #10254
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,8 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { | |
|
|
||
| match exec(&buffer) { | ||
| Ok(()) => Ok(()), | ||
| // On Windows, silently handle broken pipe since there's no SIGPIPE | ||
| #[cfg(windows)] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's move this to another PR, as it's unrelated to the rest. and please also remove this from the PR description "I also had to enable to pipe signal handlers to the yes utility ".
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The timeout gnu tests validate that when timeout yes is run with sigpipe ignored that it exits with broken pipe, I kept it because that line needs to be removed for unix to pass the gnu integ tests but it's required for windows to pass the rust integ tests we've made for it.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added this in another PR here: #10429
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which rust integ test do you mean?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Answering my own question: test_yes.rs calls check_termination(), this calls "run_stdout_starts_with" in util.rs, and this calls "child.close_stdout()" and triggers a BrokenPipe error on windows. Hence several tests are triggering BrokenPipe error on windows: test_yes::test_args, test_yes::test_long_input, |
||
| Err(err) if err.kind() == io::ErrorKind::BrokenPipe => Ok(()), | ||
| Err(err) => Err(USimpleError::new( | ||
| 1, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.