File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / man / man8 / sticky.8
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:19 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v12b, v121, HEAD
Power 6/32 Unix version 1.2b

.TH STICKY 8 "4 February 1983"
.UC 4
.SH NAME
sticky \- executable files with persistent text
.SH DESCRIPTION
While the `sticky bit', mode 01000 (see
.IR chmod (2)),
is set on a sharable executable file,
the text of that file will not be removed from the system swap area.
Thus the file does not have to be fetched from the file system
upon each execution.
As long as a copy remains in the swap area, the
original text cannot be overwritten in the file system,
nor can the file be deleted.
(Directory entries can be removed so long as one link remains.)
.PP
Sharable files are made by the
.B \-n
and
.B \-z
options of
.IR ld (1).
.PP
To replace a sticky file that has been used do:
(1) Clear the sticky bit with
.IR chmod (1).
(2) Execute the old program to flush the swapped copy.
This can be done safely even if others are using it.
(3) Overwrite the sticky file.
If the file is being executed by any process,
writing will be prevented; it suffices to simply remove the file
and then rewrite it, being careful to reset the owner and mode with
.I chmod
and
.IR chown (2).
(4) Set the sticky bit again.
.PP
Only the super-user can set the sticky bit.
.SH BUGS
Are self-evident.
.PP
Is largely unnecessary; matters only for large programs that
will page heavily to start, since text pages are normally cached incore
as long as possible after all instances of a text image exit.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.