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

util::opts::print_usage panics on broken pipe #12489

Open
TorstenScheck opened this issue Jul 18, 2016 · 2 comments
Open

util::opts::print_usage panics on broken pipe #12489

TorstenScheck opened this issue Jul 18, 2016 · 2 comments
Labels

Comments

@TorstenScheck
Copy link

@TorstenScheck TorstenScheck commented Jul 18, 2016

Not a major use case, but not nice nevertheless.

How to reproduce:

$ ./mach run -r -- --help | :

thread 'main' panicked at 'failed printing to stdout: Broken pipe (os error 32)', ../src/libstd/io/stdio.rs:617
stack backtrace:
   1: 0xb6e642a4 - std::sys::backtrace::tracing::imp::write::h6528da8103c51ab9
   2: 0xb6e6c571 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hbe741a5cc3c49508
   3: 0xb6e6c176 - std::panicking::default_hook::he0146e6a74621cb4
   4: 0xb6e51261 - std::panicking::rust_panic_with_hook::h983af77c1a2e581b
   5: 0xb6e6c843 - std::panicking::begin_panic::he426e15a3766089a
   6: 0xb6e52d6b - std::panicking::begin_panic_fmt::hdddb415186c241e7
   7: 0xb6e5907c - std::io::stdio::_print::h4cd911b6be2080b8
   8: 0xb69a02a7 - util::opts::print_usage::h4625d5a61b8d078d
   9: 0xb69a91fb - util::opts::from_cmdline_args::h9a0ca4c30dd73e45
  10: 0xb4efc517 - servo::main::h6924e5658370f6b5
  11: 0xb6e6baf5 - std::panicking::try::call::h852b0d5f2eec25e4
  12: 0xb6e75567 - __rust_try
  13: 0xb6e754fd - __rust_maybe_catch_panic
  14: 0xb6e6b58f - std::rt::lang_start::hfe4efe1fc39e4a30
  15: 0xb4f5413d - main
  16: 0xb459eaf2 - __libc_start_main
  17: 0xb4efb83c - <unknown>
@jdm jdm added the I-panic label Jul 18, 2016
@jdm
Copy link
Member

@jdm jdm commented Jul 18, 2016

I don't think there's anything we can do about this, since the stdio stdout printing functions internally panic when errors are encountered.

@nox
Copy link
Member

@nox nox commented Oct 4, 2017

@jdm We could use write!.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.