Content-type: text/html Manpage of PROTECT

PROTECT

Section: PUPS service commands (1)
Updated: 18th May 2005
Index Return to Main Contents
 

NAME


protect  PSRP file/directory protection application  

SYNOPSIS

protect [ -nice cardinal ][ -argf argument_file ][ -growth_protection ][ -help ][ -usage ][ -version ][ -slots ][ -slotinfo ][ -principal name of file to be protected ][ -defer ][ -lifetime seconds ][ -key file protection key ] >& <log file>

 

DESCRIPTION

protect(1) sets up I default_fd_homeostats (see utilib(3) ) in order to protect a file or directory specified by the user. In the case of a directory all files in the directory which match the user supplied key are protected.

 

OPTIONS


  -help invokes the on-line context help system. This "man" page is displayed. The process then exits.

-growth_protection <retrys> causes the system to retry an sbrk(3) call up to retrys times. This option permits the program to wait until the core that it requires is available rather than simply exiting if sbrk(3) fails.

-usage displays shortform usage string.

-version displays program version number.

-slots displays short form pups(3) library dependencies.

-slotinfo displays long form pups(3) library dependencies.

-argf argument_file tells the filter to take its command line arguments from the specified argument_file. The data format of the argument file is:

# ... optional comment line ...
-argflag [1]
argument_parameter [1,1]
argument_parameter [1,2]

argument_parameter [1,n]

# ... optional comment line ...
-argflag [2]
argument_parameter [1,1]
argument_parameter [1,2]

argument_parameter [1,n]

  -nice cardinal determimes the niceness at which the filter is scheduled. In keeping with all UNIX user processes, nice must be a cardinal between 0 and 20. The default niceness for protect(1) is 4.

-principal object specifies the (file system) object which is to be protected. If the object is a directory, all files matching the user supplied key are protected.

-defer tells protect(1)] to wait for principal to be created. This option is only valid if the principal is a regular file.

-lifetime seconds tells protect(1) how long it is to protect its principal for.

-key file protection key specifies a key. If filesnames within a directory contain file protection key the corresponding file(s) are homeostatically protected. This option is ignored if name of file is not a directory.

 

COMPILATION OPTIONS

If -DHYDRA_OF_LERNA is specified when compiling this application the thread of execution of the algorithm is protected using the hydra of lerna algorithm. The application parent process on startup forks a child. This child is monitored by the parent (which reforks it if it is terminated). The child also monitors the parent process. If the parent process is terminated the child forks it own child and takes over the job of protecting its principal from its parent (note this is inspired by the Hydra of Lerna, a creature of Greek Legend which had the capacity to re-grow heads which had been crushed by the hero Heracles as one of his labours -- who says a classical education is wasted!).

If -DUSE_PROTECT is specified an alternative form of homeostatic file protection algorithm (which does not use up file descriptors) is used. This option is useful if protect(1) is being used to protect directories containing many files (and the OS limit on file descriptors would be exhausted)

 

SIGNALS

SIGUSR2 is used to support PSRP event handling

 

PSRP INTERACTIVITY

Supports interactive querying while running using Process Status Request Protocol [PSRP], see psrp(1).

protect object tells protect(1) to protect (file system) object object.

unprotect object tells protect(1) to unprotect (file system) object object.

protstat tells protect(1) to show all files currently protected.

key key sets the file key to key. This option is only valid if the principal is a directory.

principal object tells protect(1) the name of the object (which is to be homeostatically protected).

status display (PSRP) process status.

 

LIBRARIES

protect(1) uses the PUPS libraries, see pups(3)

 

BUGS

setsid(2) is used to make it easy for the PUPS exit routine to clobber the child. This means any process can send a killpg(2) to the parents process group (and clobber the child as well as the parent). This is a safety feature which could be removed (should the need arise).

 

COPYRIGHT

(C) Tumbling Dice Ltd.

 

PROGRAMMER

M.A. O'Neill.

 

SEE ALSO

psrp(1), utilib(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMPILATION OPTIONS
SIGNALS
PSRP INTERACTIVITY
LIBRARIES
BUGS
COPYRIGHT
PROGRAMMER
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 13:53:35 GMT, January 11, 2008