From tim@X2296  Mon Mar 10 19:10:45 1997
Received: from X2296 (ppp1655.on.sympatico.ca [206.172.249.119])
          by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA21363
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 10 Mar 1997 19:10:26 -0800 (PST)
Received: (from tim@localhost) by X2296 (8.7.6/8.7.3) id MAA00889; Mon, 10 Mar 1997 12:05:13 -0500 (EST)
Message-Id: <199703101705.MAA00889@X2296>
Date: Mon, 10 Mar 1997 12:05:13 -0500 (EST)
From: Timothy.Michael.Van.der.Hoek@X2296
Reply-To: ac199@freenet.hamilton.on.ca
To: FreeBSD-gnats-submit@freebsd.org
Subject: man 8 sticky
X-Send-Pr-Version: 3.2

>Number:         2939
>Category:       docs
>Synopsis:       `man 8 sticky` == outdated
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    steve
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 10 19:20:08 PST 1997
>Closed-Date:    Sun Aug 17 10:52:43 PDT 1997
>Last-Modified:  Sun Aug 17 10:54:10 PDT 1997
>Originator:     Tim Vanderhoek
>Release:        FreeBSD 2.2-961006-SNAP i386
>Organization:
>Environment:

March.  Snowy.

>Description:

chmod(2) contradicts the very sticky(8) manpage that it cites
re: the effect of the sticky bit on executables.

>How-To-Repeat:

man 8 sticky

>Fix:
	
I don't actually know what I'm talking about, but I think the 
below fix works...

*** sticky.orig	Mon Mar 10 11:57:42 1997
--- sticky.8	Mon Mar 10 11:58:26 1997
***************
*** 51,71 ****
  .Pa /usr/include/sys/stat.h
  for an explanation of file modes.
  .Sh STICKY TEXT EXECUTABLE FILES
! An executable shareable file whose sticky bit is set
! will not be immediately discarded from swap space after execution.
! The kernel will hoard the text segment of the file for future
! reuse and avoid having to reload the program.
! Shareable text segments are normally placed
! in a least-frequently-used cache after use,
! and thus the `sticky bit' has little effect on commonly-used text images.
! .Pp
! Sharable executable files are created with the
! .Fl n
! and
! .Fl z
! options of
! the loader
! .Xr ld 1 .
  .Pp
  Only the super-user can set the sticky bit
  on a sharable executable file.
--- 51,60 ----
  .Pa /usr/include/sys/stat.h
  for an explanation of file modes.
  .Sh STICKY TEXT EXECUTABLE FILES
! Historically, the sticky bit on executables was used to
! denote executables which were run often and should be cached
! to speed execution.  Thanks to FreeBSD's merged VM/file buffer it now 
! dynamically determines which executables should be cached. 
  .Pp
  Only the super-user can set the sticky bit
  on a sharable executable file.
***************
*** 87,95 ****
  See
  .Xr chmod 1
  for details about modifying file modes.
- .Sh BUGS
- Since the text areas of sticky text executables are stashed in the swap area,
- abuse of the feature can cause a system to run out of swap.
  .Pp
  Neither
  .Xr open 2
--- 76,81 ----
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Sun Aug 17 10:52:43 PDT 1997 
State-Changed-Why:  
Similar fix already applied as part of the fix for PR#4198. 
Thanks to Tim Vanderhoek <hoek@hwcn.org> for pointing this out. 
>Unformatted:
