Function libseccomp::reset_global_state
source · [−]pub fn reset_global_state() -> Result<(), SeccompError>
Expand description
Resets the libseccomp library’s global state.
This function resets the (internal) global state of the libseccomp library,
this includes any notification file descriptors retrieved by
get_notify_fd
.
Normally you do not need this but it may be required to continue using
the libseccomp library after a fork()
/clone()
to ensure the API level
and user notification state is properly reset.
This function corresponds to
seccomp_reset
.
Errors
If the linked libseccomp library is older than v2.5.1 this function will return an error.
Examples
reset_global_state()?;