home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Unix System Administration Handbook 1997 October
/
usah_oct97.iso
/
news
/
nn.tar
/
nn-6.5.1
/
proto.h
< prev
next >
Wrap
Text File
|
1995-04-29
|
1KB
|
31 lines
/*
* (c) Copyright 1990, Kim Fabricius Storm. All rights reserved.
*
* Master/slave communication and locking.
*/
/*
* proto_lock() modes
*/
#define PL_SET 1 /* set lock (if not set) */
#define PL_SET_WAIT 2 /* set lock (wait until set) */
#define PL_SET_QUICK 3 /* as _WAIT, but using sleep(1) */
#define PL_CLEAR 4 /* clear lock */
#define PL_CLEAR_WAIT 5 /* wait for lock to disappear */
#define PL_CHECK 6 /* check running status */
#define PL_WAKEUP 7 /* send wakeup (must succeed) */
#define PL_WAKEUP_SOFT 8 /* send wakeup (may fail) */
#define PL_TERMINATE 9 /* send termination */
#define PL_TRANSFER 10 /* transfer lock to current process (forked) */
/*
* types for send_master(type, group, opt, arg)
*/
#define SM_SET_OPTION 'O' /* set option to arg (toggle if -1) */
#define SM_SET_FLAG 'F' /* opt=set/clear flag 'arg' in group */
#define SM_RECOLLECT 'R' /* recollect group (or all groups if NULL) */
#define SM_EXPIRE 'X' /* expire group (or all groups if NULL) */
#define SM_SCAN_ONCE 'U' /* scan unconditionally (ignore active) */