From 76127275a09d970169952bcf616f966faa9ed6db Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Sat, 21 Jan 2017 13:38:11 -0500 Subject: [PATCH 1/4] Add `eprint!` and `eprintln!` macros to the prelude. These are exactly the same as `print!` and `println!` except that they write to stderr instead of stdout. Issue #39228. --- src/libstd/io/mod.rs | 2 + src/libstd/io/stdio.rs | 36 +++++++++++++++ src/libstd/macros.rs | 45 +++++++++++++++++++ .../run-pass/print-stdout-eprint-stderr.rs | 40 +++++++++++++++++ 4 files changed, 123 insertions(+) create mode 100644 src/test/run-pass/print-stdout-eprint-stderr.rs diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index e2832873e2e67..b6d3c920fb942 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -290,6 +290,8 @@ pub use self::util::{copy, sink, Sink, empty, Empty, repeat, Repeat}; pub use self::stdio::{stdin, stdout, stderr, _print, Stdin, Stdout, Stderr}; #[stable(feature = "rust1", since = "1.0.0")] pub use self::stdio::{StdoutLock, StderrLock, StdinLock}; +#[unstable(feature = "eprint", issue="39228")] +pub use self::stdio::_eprint; #[unstable(feature = "libstd_io_internals", issue = "0")] #[doc(no_inline, hidden)] pub use self::stdio::{set_panic, set_print}; diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 38ad23e14b3eb..de80cb4980421 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -694,6 +694,42 @@ pub fn _print(args: fmt::Arguments) { } } +#[unstable(feature = "eprint_internal", + reason = "implementation detail which may disappear or be replaced at any time", + issue = "0")] +#[doc(hidden)] +pub fn _eprint(args: fmt::Arguments) { + // As an implementation of the `eprintln!` macro, we want to try our best to + // not panic wherever possible and get the output somewhere. There are + // currently two possible vectors for panics we take care of here: + // + // 1. If the TLS key for the local stderr has been destroyed, accessing it + // would cause a panic. Note that we just lump in the uninitialized case + // here for convenience, we're not trying to avoid a panic. + // 2. If the local stderr is currently in use (e.g. we're in the middle of + // already printing) then accessing again would cause a panic. + // + // If, however, the actual I/O causes an error, we do indeed panic. + use panicking::LOCAL_STDERR; + let result = match LOCAL_STDERR.state() { + LocalKeyState::Uninitialized | + LocalKeyState::Destroyed => stderr().write_fmt(args), + LocalKeyState::Valid => { + LOCAL_STDERR.with(|s| { + if let Ok(mut borrowed) = s.try_borrow_mut() { + if let Some(w) = borrowed.as_mut() { + return w.write_fmt(args); + } + } + stderr().write_fmt(args) + }) + } + }; + if let Err(e) = result { + panic!("failed printing to stderr: {}", e); + } +} + #[cfg(test)] mod tests { use thread; diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index a1f092621cb44..d1c304ec46e79 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -68,6 +68,9 @@ macro_rules! panic { /// necessary to use `io::stdout().flush()` to ensure the output is emitted /// immediately. /// +/// Use `print!` only for the primary output of your program. Use +/// `eprint!` instead to print error and progress messages. +/// /// # Panics /// /// Panics if writing to `io::stdout()` fails. @@ -105,6 +108,9 @@ macro_rules! print { /// Use the `format!` syntax to write data to the standard output. /// See `std::fmt` for more information. /// +/// Use `println!` only for the primary output of your program. Use +/// `eprintln!` instead to print error and progress messages. +/// /// # Panics /// /// Panics if writing to `io::stdout()` fails. @@ -124,6 +130,45 @@ macro_rules! println { ($fmt:expr, $($arg:tt)*) => (print!(concat!($fmt, "\n"), $($arg)*)); } +/// Macro for printing to the standard error. +/// +/// Equivalent to the `print!` macro, except that output goes to +/// `io::stderr()` instead of `io::stdout()`. See `print!` for +/// example usage. +/// +/// Use `eprint!` only for error and progress messages. Use `print!` +/// instead for the primary output of your program. +/// +/// # Panics +/// +/// Panics if writing to `io::stderr()` fails. +#[macro_export] +#[unstable(feature = "eprint", issue="39228")] +#[allow_internal_unstable] +macro_rules! eprint { + ($($arg:tt)*) => ($crate::io::_eprint(format_args!($($arg)*))); +} + +/// Macro for printing to the standard error, with a newline. +/// +/// Equivalent to the `println!` macro, except that output goes to +/// `io::stderr()` instead of `io::stdout()`. See `println!` for +/// example usage. +/// +/// Use `eprintln!` only for error and progress messages. Use `println!` +/// instead for the primary output of your program. +/// +/// # Panics +/// +/// Panics if writing to `io::stderr()` fails. +#[macro_export] +#[unstable(feature = "eprint", issue="39228")] +macro_rules! eprintln { + () => (eprint!("\n")); + ($fmt:expr) => (eprint!(concat!($fmt, "\n"))); + ($fmt:expr, $($arg:tt)*) => (eprint!(concat!($fmt, "\n"), $($arg)*)); +} + /// A macro to select an event from a number of receivers. /// /// This macro is used to wait for the first event to occur on a number of diff --git a/src/test/run-pass/print-stdout-eprint-stderr.rs b/src/test/run-pass/print-stdout-eprint-stderr.rs new file mode 100644 index 0000000000000..8ca6e1c63567e --- /dev/null +++ b/src/test/run-pass/print-stdout-eprint-stderr.rs @@ -0,0 +1,40 @@ +// Copyright 2017 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(eprint)] + +use std::{env, process}; + +fn child() { + print!("[stdout 0]"); + print!("[stdout {}]", 1); + println!("[stdout {}]", 2); + println!(); + eprint!("[stderr 0]"); + eprint!("[stderr {}]", 1); + eprintln!("[stderr {}]", 2); + eprintln!(); +} + +fn parent() { + let this = env::args().next().unwrap(); + let output = process::Command::new(this).arg("-").output().unwrap(); + assert!(output.status.success()); + + let stdout = String::from_utf8(output.stdout).unwrap(); + let stderr = String::from_utf8(output.stderr).unwrap(); + + assert_eq!(stdout, "[stdout 0][stdout 1][stdout 2]\n\n"); + assert_eq!(stderr, "[stderr 0][stderr 1][stderr 2]\n\n"); +} + +fn main() { + if env::args().count() == 2 { child() } else { parent() } +} From 07766f675caaabc1d64ef59db6ddfa43e72e6d4f Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Thu, 13 Apr 2017 10:48:09 -0400 Subject: [PATCH 2/4] Revise the eprint(ln)! feature. * Factor out the nigh-identical bodies of `_print` and `_eprint` to a helper function `print_to` (I was sorely tempted to call it `_doprnt`). * Update the issue number for the unstable `eprint` feature. * Add entries to the "unstable book" for `eprint` and `eprint_internal`. * Style corrections to the documentation. --- src/doc/unstable-book/src/SUMMARY.md | 2 + .../src/library-features/eprint-internal.md | 5 ++ .../src/library-features/eprint.md | 13 +++ src/libstd/io/mod.rs | 2 +- src/libstd/io/stdio.rs | 79 +++++++------------ src/libstd/macros.rs | 14 ++-- 6 files changed, 57 insertions(+), 58 deletions(-) create mode 100644 src/doc/unstable-book/src/library-features/eprint-internal.md create mode 100644 src/doc/unstable-book/src/library-features/eprint.md diff --git a/src/doc/unstable-book/src/SUMMARY.md b/src/doc/unstable-book/src/SUMMARY.md index 3d9e7c7fd860d..9229f445297df 100644 --- a/src/doc/unstable-book/src/SUMMARY.md +++ b/src/doc/unstable-book/src/SUMMARY.md @@ -130,6 +130,8 @@ - [derive_eq](library-features/derive-eq.md) - [discriminant_value](library-features/discriminant-value.md) - [error_type_id](library-features/error-type-id.md) + - [eprint](library-features/eprint.md) + - [eprint_internal](library-features/eprint-internal.md) - [exact_size_is_empty](library-features/exact-size-is-empty.md) - [fd](library-features/fd.md) - [fd_read](library-features/fd-read.md) diff --git a/src/doc/unstable-book/src/library-features/eprint-internal.md b/src/doc/unstable-book/src/library-features/eprint-internal.md new file mode 100644 index 0000000000000..d3230d8bfa83e --- /dev/null +++ b/src/doc/unstable-book/src/library-features/eprint-internal.md @@ -0,0 +1,5 @@ +# `eprint_internal` + +This feature is internal to the Rust compiler and is not intended for general use. + +------------------------ diff --git a/src/doc/unstable-book/src/library-features/eprint.md b/src/doc/unstable-book/src/library-features/eprint.md new file mode 100644 index 0000000000000..69f781b224167 --- /dev/null +++ b/src/doc/unstable-book/src/library-features/eprint.md @@ -0,0 +1,13 @@ +# `eprint` + +The tracking issue for this feature is: [#40528] + +[#40528]: https://github.com/rust-lang/rust/issues/40528 + +------------------------ + +This feature enables the `eprint!` and `eprintln!` global macros, +which are just like `print!` and `println!`, respectively, except that +they send output to the standard _error_ stream, rather than standard +output. (`panic!` messages have always been written to standard error.) + diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index b6d3c920fb942..9320bfe9abee5 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -290,7 +290,7 @@ pub use self::util::{copy, sink, Sink, empty, Empty, repeat, Repeat}; pub use self::stdio::{stdin, stdout, stderr, _print, Stdin, Stdout, Stderr}; #[stable(feature = "rust1", since = "1.0.0")] pub use self::stdio::{StdoutLock, StderrLock, StdinLock}; -#[unstable(feature = "eprint", issue="39228")] +#[unstable(feature = "eprint", issue="40528")] pub use self::stdio::_eprint; #[unstable(feature = "libstd_io_internals", issue = "0")] #[doc(no_inline, hidden)] diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index de80cb4980421..363c99c666e3a 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -17,7 +17,7 @@ use io::{self, BufReader, LineWriter}; use sync::{Arc, Mutex, MutexGuard}; use sys::stdio; use sys_common::remutex::{ReentrantMutex, ReentrantMutexGuard}; -use thread::LocalKeyState; +use thread::{LocalKey, LocalKeyState}; /// Stdout used by print! and println! macros thread_local! { @@ -659,75 +659,54 @@ pub fn set_print(sink: Option>) -> Option> { }) } -#[unstable(feature = "print", - reason = "implementation detail which may disappear or be replaced at any time", - issue = "0")] -#[doc(hidden)] -pub fn _print(args: fmt::Arguments) { - // As an implementation of the `println!` macro, we want to try our best to - // not panic wherever possible and get the output somewhere. There are - // currently two possible vectors for panics we take care of here: - // - // 1. If the TLS key for the local stdout has been destroyed, accessing it - // would cause a panic. Note that we just lump in the uninitialized case - // here for convenience, we're not trying to avoid a panic. - // 2. If the local stdout is currently in use (e.g. we're in the middle of - // already printing) then accessing again would cause a panic. - // - // If, however, the actual I/O causes an error, we do indeed panic. - let result = match LOCAL_STDOUT.state() { +/// Write `args` to output stream `local_s` if possible, `global_s` +/// otherwise. `label` identifies the stream in a panic message. +/// +/// This function is used to print error messages, so it takes extra +/// care to avoid causing a panic when `local_stream` is unusable. +/// For instance, if the TLS key for the local stream is uninitialized +/// or already destroyed, or if the local stream is locked by another +/// thread, it will just fall back to the global stream. +/// +/// However, if the actual I/O causes an error, this function does panic. +fn print_to(args: fmt::Arguments, + local_s: &'static LocalKey>>>, + global_s: fn() -> T, + label: &str) where T: Write { + let result = match local_s.state() { LocalKeyState::Uninitialized | - LocalKeyState::Destroyed => stdout().write_fmt(args), + LocalKeyState::Destroyed => global_s().write_fmt(args), LocalKeyState::Valid => { - LOCAL_STDOUT.with(|s| { + local_s.with(|s| { if let Ok(mut borrowed) = s.try_borrow_mut() { if let Some(w) = borrowed.as_mut() { return w.write_fmt(args); } } - stdout().write_fmt(args) + global_s().write_fmt(args) }) } }; if let Err(e) = result { - panic!("failed printing to stdout: {}", e); + panic!("failed printing to {}: {}", label, e); } } +#[unstable(feature = "print", + reason = "implementation detail which may disappear or be replaced at any time", + issue = "0")] +#[doc(hidden)] +pub fn _print(args: fmt::Arguments) { + print_to(args, &LOCAL_STDOUT, stdout, "stdout"); +} + #[unstable(feature = "eprint_internal", reason = "implementation detail which may disappear or be replaced at any time", issue = "0")] #[doc(hidden)] pub fn _eprint(args: fmt::Arguments) { - // As an implementation of the `eprintln!` macro, we want to try our best to - // not panic wherever possible and get the output somewhere. There are - // currently two possible vectors for panics we take care of here: - // - // 1. If the TLS key for the local stderr has been destroyed, accessing it - // would cause a panic. Note that we just lump in the uninitialized case - // here for convenience, we're not trying to avoid a panic. - // 2. If the local stderr is currently in use (e.g. we're in the middle of - // already printing) then accessing again would cause a panic. - // - // If, however, the actual I/O causes an error, we do indeed panic. use panicking::LOCAL_STDERR; - let result = match LOCAL_STDERR.state() { - LocalKeyState::Uninitialized | - LocalKeyState::Destroyed => stderr().write_fmt(args), - LocalKeyState::Valid => { - LOCAL_STDERR.with(|s| { - if let Ok(mut borrowed) = s.try_borrow_mut() { - if let Some(w) = borrowed.as_mut() { - return w.write_fmt(args); - } - } - stderr().write_fmt(args) - }) - } - }; - if let Err(e) = result { - panic!("failed printing to stderr: {}", e); - } + print_to(args, &LOCAL_STDERR, stderr, "stderr"); } #[cfg(test)] diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index d1c304ec46e79..98c635d127f7d 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -113,7 +113,7 @@ macro_rules! print { /// /// # Panics /// -/// Panics if writing to `io::stdout()` fails. +/// Panics if writing to `io::stdout` fails. /// /// # Examples /// @@ -133,7 +133,7 @@ macro_rules! println { /// Macro for printing to the standard error. /// /// Equivalent to the `print!` macro, except that output goes to -/// `io::stderr()` instead of `io::stdout()`. See `print!` for +/// `io::stderr` instead of `io::stdout`. See `print!` for /// example usage. /// /// Use `eprint!` only for error and progress messages. Use `print!` @@ -141,9 +141,9 @@ macro_rules! println { /// /// # Panics /// -/// Panics if writing to `io::stderr()` fails. +/// Panics if writing to `io::stderr` fails. #[macro_export] -#[unstable(feature = "eprint", issue="39228")] +#[unstable(feature = "eprint", issue="40528")] #[allow_internal_unstable] macro_rules! eprint { ($($arg:tt)*) => ($crate::io::_eprint(format_args!($($arg)*))); @@ -152,7 +152,7 @@ macro_rules! eprint { /// Macro for printing to the standard error, with a newline. /// /// Equivalent to the `println!` macro, except that output goes to -/// `io::stderr()` instead of `io::stdout()`. See `println!` for +/// `io::stderr` instead of `io::stdout`. See `println!` for /// example usage. /// /// Use `eprintln!` only for error and progress messages. Use `println!` @@ -160,9 +160,9 @@ macro_rules! eprint { /// /// # Panics /// -/// Panics if writing to `io::stderr()` fails. +/// Panics if writing to `io::stderr` fails. #[macro_export] -#[unstable(feature = "eprint", issue="39228")] +#[unstable(feature = "eprint", issue="40528")] macro_rules! eprintln { () => (eprint!("\n")); ($fmt:expr) => (eprint!(concat!($fmt, "\n"))); From 4ab3bcb9ca137ad6e6ee4ae4a70a234d92b6d4ab Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Thu, 20 Apr 2017 17:37:12 -0400 Subject: [PATCH 3/4] Fix up stability annotations per feedback. --- src/doc/unstable-book/src/SUMMARY.md | 4 +--- .../unstable-book/src/library-features/eprint.md | 13 ------------- .../{eprint-internal.md => print-internals.md} | 2 +- src/doc/unstable-book/src/library-features/print.md | 5 ----- src/libstd/io/mod.rs | 6 +++--- src/libstd/io/stdio.rs | 4 ++-- src/libstd/macros.rs | 4 ++-- src/test/run-pass/print-stdout-eprint-stderr.rs | 2 -- 8 files changed, 9 insertions(+), 31 deletions(-) delete mode 100644 src/doc/unstable-book/src/library-features/eprint.md rename src/doc/unstable-book/src/library-features/{eprint-internal.md => print-internals.md} (84%) delete mode 100644 src/doc/unstable-book/src/library-features/print.md diff --git a/src/doc/unstable-book/src/SUMMARY.md b/src/doc/unstable-book/src/SUMMARY.md index 9229f445297df..8f26e4d36cda2 100644 --- a/src/doc/unstable-book/src/SUMMARY.md +++ b/src/doc/unstable-book/src/SUMMARY.md @@ -130,8 +130,6 @@ - [derive_eq](library-features/derive-eq.md) - [discriminant_value](library-features/discriminant-value.md) - [error_type_id](library-features/error-type-id.md) - - [eprint](library-features/eprint.md) - - [eprint_internal](library-features/eprint-internal.md) - [exact_size_is_empty](library-features/exact-size-is-empty.md) - [fd](library-features/fd.md) - [fd_read](library-features/fd-read.md) @@ -180,7 +178,7 @@ - [peek](library-features/peek.md) - [placement_in](library-features/placement-in.md) - [placement_new_protocol](library-features/placement-new-protocol.md) - - [print](library-features/print.md) + - [print_internals](library-features/print-internals.md) - [proc_macro_internals](library-features/proc-macro-internals.md) - [process_try_wait](library-features/process-try-wait.md) - [question_mark_carrier](library-features/question-mark-carrier.md) diff --git a/src/doc/unstable-book/src/library-features/eprint.md b/src/doc/unstable-book/src/library-features/eprint.md deleted file mode 100644 index 69f781b224167..0000000000000 --- a/src/doc/unstable-book/src/library-features/eprint.md +++ /dev/null @@ -1,13 +0,0 @@ -# `eprint` - -The tracking issue for this feature is: [#40528] - -[#40528]: https://github.com/rust-lang/rust/issues/40528 - ------------------------- - -This feature enables the `eprint!` and `eprintln!` global macros, -which are just like `print!` and `println!`, respectively, except that -they send output to the standard _error_ stream, rather than standard -output. (`panic!` messages have always been written to standard error.) - diff --git a/src/doc/unstable-book/src/library-features/eprint-internal.md b/src/doc/unstable-book/src/library-features/print-internals.md similarity index 84% rename from src/doc/unstable-book/src/library-features/eprint-internal.md rename to src/doc/unstable-book/src/library-features/print-internals.md index d3230d8bfa83e..a68557872af55 100644 --- a/src/doc/unstable-book/src/library-features/eprint-internal.md +++ b/src/doc/unstable-book/src/library-features/print-internals.md @@ -1,4 +1,4 @@ -# `eprint_internal` +# `print_internals` This feature is internal to the Rust compiler and is not intended for general use. diff --git a/src/doc/unstable-book/src/library-features/print.md b/src/doc/unstable-book/src/library-features/print.md deleted file mode 100644 index dc25cb237e3b5..0000000000000 --- a/src/doc/unstable-book/src/library-features/print.md +++ /dev/null @@ -1,5 +0,0 @@ -# `print` - -This feature is internal to the Rust compiler and is not intended for general use. - ------------------------- diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 9320bfe9abee5..c872a8e526114 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -287,11 +287,11 @@ pub use self::error::{Result, Error, ErrorKind}; #[stable(feature = "rust1", since = "1.0.0")] pub use self::util::{copy, sink, Sink, empty, Empty, repeat, Repeat}; #[stable(feature = "rust1", since = "1.0.0")] -pub use self::stdio::{stdin, stdout, stderr, _print, Stdin, Stdout, Stderr}; +pub use self::stdio::{stdin, stdout, stderr, Stdin, Stdout, Stderr}; #[stable(feature = "rust1", since = "1.0.0")] pub use self::stdio::{StdoutLock, StderrLock, StdinLock}; -#[unstable(feature = "eprint", issue="40528")] -pub use self::stdio::_eprint; +#[unstable(feature = "print_internals", issue = "0")] +pub use self::stdio::{_print, _eprint}; #[unstable(feature = "libstd_io_internals", issue = "0")] #[doc(no_inline, hidden)] pub use self::stdio::{set_panic, set_print}; diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 363c99c666e3a..a8b0bf0071a22 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -692,7 +692,7 @@ fn print_to(args: fmt::Arguments, } } -#[unstable(feature = "print", +#[unstable(feature = "print_internals", reason = "implementation detail which may disappear or be replaced at any time", issue = "0")] #[doc(hidden)] @@ -700,7 +700,7 @@ pub fn _print(args: fmt::Arguments) { print_to(args, &LOCAL_STDOUT, stdout, "stdout"); } -#[unstable(feature = "eprint_internal", +#[unstable(feature = "print_internals", reason = "implementation detail which may disappear or be replaced at any time", issue = "0")] #[doc(hidden)] diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 98c635d127f7d..ef78ea6dfe8ee 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -143,7 +143,7 @@ macro_rules! println { /// /// Panics if writing to `io::stderr` fails. #[macro_export] -#[unstable(feature = "eprint", issue="40528")] +#[stable(feature = "eprint", since="1.18.0")] #[allow_internal_unstable] macro_rules! eprint { ($($arg:tt)*) => ($crate::io::_eprint(format_args!($($arg)*))); @@ -162,7 +162,7 @@ macro_rules! eprint { /// /// Panics if writing to `io::stderr` fails. #[macro_export] -#[unstable(feature = "eprint", issue="40528")] +#[stable(feature = "eprint", since="1.18.0")] macro_rules! eprintln { () => (eprint!("\n")); ($fmt:expr) => (eprint!(concat!($fmt, "\n"))); diff --git a/src/test/run-pass/print-stdout-eprint-stderr.rs b/src/test/run-pass/print-stdout-eprint-stderr.rs index 8ca6e1c63567e..f65d841700efa 100644 --- a/src/test/run-pass/print-stdout-eprint-stderr.rs +++ b/src/test/run-pass/print-stdout-eprint-stderr.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(eprint)] - use std::{env, process}; fn child() { From 72588a2b2a1af655b81fcd3c1c467707d9c237c2 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Wed, 10 May 2017 15:28:25 -0400 Subject: [PATCH 4/4] Skip print-stdout-eprint-stderr test on emscripten --- src/test/run-pass/print-stdout-eprint-stderr.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/run-pass/print-stdout-eprint-stderr.rs b/src/test/run-pass/print-stdout-eprint-stderr.rs index f65d841700efa..0a0f30aba72c2 100644 --- a/src/test/run-pass/print-stdout-eprint-stderr.rs +++ b/src/test/run-pass/print-stdout-eprint-stderr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-emscripten spawning processes is not supported + use std::{env, process}; fn child() {