screen_unregister_event()

Updated: April 19, 2023

Unregister a sigevent from use with asynchronous notifications

Synopsis:

#include <screen/screen.h>
int screen_unregister_event(struct sigevent *event)

Arguments:

event
The sigevent that you're unregistering.

Library:

libscreen

Description:

Function Type: Immediate Execution

This function unregisters a sigevent from Screen; it's associated with the preprocessor definition screen_register_event.

We recommend that you call screen_unregister_event() only after you've disabled asynchronous notifications that are using the event you are unregistering. If you remove the event registration while you still have asynchronous notifications using that event enabled, you may not receive any notifications. To disable asynchronous notifications, call screen_notify() with the event argument set to NULL, or its type set to SIGEV_NONE (e.g., use SIGEV_NONE_INIT()) for those notifications that were enabled.

Returns:

0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).