diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/runtime/stdout-during-shutdown.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/runtime/stdout-during-shutdown.rs b/src/test/ui/runtime/stdout-during-shutdown.rs new file mode 100644 index 000000000..a6cf812ca --- /dev/null +++ b/src/test/ui/runtime/stdout-during-shutdown.rs @@ -0,0 +1,19 @@ +// run-pass +// check-run-results +// ignore-emscripten + +// Emscripten doesn't flush its own stdout buffers on exit, which would fail +// this test. So this test is disabled on this platform. +// See https://emscripten.org/docs/getting_started/FAQ.html#what-does-exiting-the-runtime-mean-why-don-t-atexit-s-run + +#![feature(rustc_private)] + +extern crate libc; + +fn main() { + extern "C" fn bye() { + print!(", world!"); + } + unsafe { libc::atexit(bye) }; + print!("hello"); +} |