c-scape 0.22.3

A libc bottom-half implementation in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use errno::{set_errno, Errno};
use libc::c_int;

#[no_mangle]
unsafe extern "C" fn pause() -> c_int {
    libc!(libc::pause());

    rustix::event::pause();

    // `pause` sleeps until it is interrupted by a signal, so it always fails
    // with `EINTR`.
    set_errno(Errno(libc::EINTR));
    -1
}