rust/tests/fail/unsupported_signal.rs

14 lines
412 B
Rust
Raw Normal View History

//! `signal()` is special on Linux and macOS that it's only supported within libstd.
2021-06-06 03:33:46 -05:00
//! The implementation is not complete enough to permit user code to call it.
// ignore-windows: No libc on Windows
#![feature(rustc_private)]
extern crate libc;
fn main() {
unsafe {
libc::signal(libc::SIGPIPE, libc::SIG_IGN);
//~^ ERROR unsupported operation: can't call foreign function: signal
}
}