Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(2)

chown(2)

install(1)

STICKY(8)  —  UNIX Programmer’s Manual

NAME

sticky − executable files with persistent text

DESCRIPTION

Normally, the text pages of a sharable executable file remain cached in memory long after all instances of a text image exit.  The system’s representation of shared text is reused on a least recently used basis (the system reuses the oldest text pages first).  When the ‘sticky bit’, mode 01000 (see chmod(2)), is set on a sharable executable file, the system’s representation of the shared text is never reused. 

Sharable files are created using the −n and −z options of ld(1).

To replace a sticky file that has been used:

(1) Create a new file with the same name.  Note that if the file is being executed by any process, writing is prevented; it suffices to simply remove the file and then rewrite it, being careful to reset the owner and mode with chmod(2) and chown(2) (see install(1)).

(2) Set the sticky bit again. 

Only the super-user can set the sticky bit. 

NOTE

Sticky is largely unnecessary on a virtual-memory machine, since text pages are normally cached as long as possible after all instances of a text image exit. 

SEE ALSO

chmod(2), chown(2), install(1)

4BSD

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026