sway_terminate -> !

This commit is contained in:
chayleaf 2024-08-14 09:36:56 +07:00
parent 7bd10bbfd5
commit 890728865b
Signed by: chayleaf
GPG key ID: 78171AD46227E68E

View file

@ -329,7 +329,7 @@ unsafe extern "C" fn swayidle_finish() {
free(state.before_sleep_cmd.cast::<libc::c_void>());
}
#[no_mangle]
unsafe extern "C" fn sway_terminate(exit_code: libc::c_int) {
unsafe extern "C" fn sway_terminate(exit_code: libc::c_int) -> ! {
wl_display_disconnect(state.display);
wl_event_loop_destroy(state.event_loop);
swayidle_finish();
@ -1364,7 +1364,6 @@ unsafe extern "C" fn handle_signal(sig: libc::c_int, _data: *mut libc::c_void) -
.cast::<swayidle_timeout_cmd>();
}
sway_terminate(0 as libc::c_int);
return 0 as libc::c_int;
}
10 => {
log::debug!("Got SIGUSR1");
@ -1662,7 +1661,6 @@ unsafe fn main_0(argc: libc::c_int, argv: *mut *mut libc::c_char) -> libc::c_int
wl_event_source_check(source);
while wl_event_loop_dispatch(state.event_loop, -(1 as libc::c_int)) != 1 as libc::c_int {}
sway_terminate(0 as libc::c_int);
0
}
fn main() {
let mut args: Vec<*mut libc::c_char> = Vec::new();