EXEC_SYS_REGISTER(2)

NAME
exec_sys_register, exec_sys_unregister - register/unregister for resident execution

LIBRARY
libc

SYNOPSIS
#include <sys/resident.h>
int
exec_sys_register(void *entry);
int
exec_sys_unregister(int id);

DESCRIPTION
The exec_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

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
resident(8)

HISTORY
The exec_sys_register and exec_sys_unregister system calls first appeared in DragonFly 1.0.

AUTHORS
-nosplit The exec_sys_register and exec_sys_unregister system calls were written by Matthew Dillon and this manual page was written by Sascha Wildner.