NAME
exec_sys_register
,
exec_sys_unregister
—
register/unregister for resident
execution
LIBRARY
library “libc”
SYNOPSIS
#include
<sys/resident.h>
int
exec_sys_register
(void
*entry);
int
exec_sys_unregister
(int
id);
DESCRIPTION
Theexec_sys_register
()
system call registers the binary of the calling process for resident
execution. This snapshots the vmspace and causes future
exec
()s
of the specified binary to use the snapshot directly rather than load and
relocate a new copy.
The
exec_sys_unregister
()
system call unregisters a resident binary identified by
id, or the binary of the calling process if
id is -1 , or all registered binaries if
id is -2.
Both can only be done by the superuser.
RETURN VALUES
The exec_sys_register
() and
exec_sys_unregister
() functions return the
value 0 if successful; otherwise the value -1 is returned and
the global variable errno is set to indicate the
error.
ERRORS
The exec_sys_register
() system call will
fail if one of the following occurs:
- [
EEXIST
] - The binary is already resident.
- [
ENOENT
] - No associated vnode exists.
- [
EPERM
] - The caller does not have sufficient permissions.
The exec_sys_unregister
() system call will
fail if one of the following occurs:
- [
ENOENT
] - The specified id could not be found.
- [
EPERM
] - The caller does not have sufficient permissions.
SEE ALSO
HISTORY
The exec_sys_register
and
exec_sys_unregister
system calls first appeared in
DragonFly 1.0.
AUTHORS
The exec_sys_register
and
exec_sys_unregister
system calls were written by
Matthew Dillon and this manual page was written by
Sascha Wildner.