lock(S-osr5)
lock --
locks a process in primary memory
Syntax
cc . . . -lx
int lock (flag);
int flag;
Description
If the flag argument is nonzero,
the process executing this call
is not swapped except if it is required to grow.
If the argument is zero, the process is unlocked.
This call may only be executed by the super user.
If someone other that the super-user tries to execute
this call, a value of -1 is returned and the errno
is set to EPERM.
Notes
Locked processes interfere with the compaction of primary memory
and can cause deadlock.
Systems with small memory configurations should
avoid using this call.
It is best to lock a process soon after booting
to ensure that it is locked into memory.
This feature is a XENIX specific enhancement and
may not be present in all UNIX implementations.
Standards conformance
lock is conformant with:
X/Open Portability Guide, Issue 3, 1989
.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005