[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sticky bit



On Thu, 2005-03-17 at 17:57 -0300, JEMF wrote:

> Many people says that the stick bit is a feature to keep an executable 
> in the memory.

Not really. Traditionally, that bit was used on (executable) files to
indicate that the (binary) text portion should be kept in cache memory
after execution. That was in times when harddisks were slow. Afaik, this
bit has no meaning on files these days under linux, and even if it did
there apparently were two more points you misunderstood:

(1) if that bit still worked as cache bit, it wouldn't affect shell
    scripts but rather binary executables

(2) if that bit still worked as cache bit, the caching mechanism had to
    check whether the file changed on disk before another execution,
    and if so load the changed executable.

So that feature never lend itself to tricking the OS into executing
a binary which had changed on disk between executions.

Regards, Bruno.





Reply to: