[OpenAFS] OpenAFS on Linux 2.5.x

Jeffrey Hutzelman jhutz@cmu.edu
Thu, 17 Apr 2003 12:30:55 -0400 (EDT)


On Thu, 17 Apr 2003, Chaskiel M Grundman wrote:

> --On Thursday, April 17, 2003 08:59:19 -0400 chas williams
> <chas@locutus.cmf.nrl.navy.mil> wrote:
>
> > that being said, i think it would be enough to produce a mapping between
> > PAGs and the process group leader's pid, uid, and start_time.  start_time
> > wouldnt be necessary if you could track when a process group ended but
> > alas that is not possible.
>
> There's a problem with using process groups: They change _alot_. If you use
> a shell with job control, programs run by the shell are in a different pgrp
> than the shell itself. Using the session leader's pid is a little better,
> but then you lose whenever your run a new xterm, since the toplevel shell
> in each xterm is a session leader. This will also break any sort of daemon
> process that you try to give tokens to, since such things tend to break off
> and become their own session, in order to avoid getting SIGINT and SIGQUIT
> from the terminal driver.
>
> To be useful, an AFS pag needs to be durable, and not change unexpectedly
> when a process performs some unrelated procedure

To reiterate...  Don't conflate PAG's with process groups; they do
different things and need different scoping rules.  Though some may have
forgotten, we've learned that lesson already -- it's why there's now a
distinction between process groups and sessions.

PAG scoping is completely orthogonal to sessions.  Many PAGs contain
multiple sessions, due to things like running multiple xterms each of
which contains a session leader (as described above).  But conversely, I
frequently have xterms which run processes in different PAG's, since I
routinely establish new PAG's to do privileged operations.