DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

lock(S)


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 .


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003