[12350] | 1 | .\" $Id: session_gate.1,v 1.5 1999-01-22 23:15:27 ghudson Exp $ |
---|
[3888] | 2 | .\" |
---|
[3889] | 3 | .TH SESSION_GATE 1 "30 November 1990" |
---|
[3888] | 4 | .ds ]W MIT Project Athena |
---|
| 5 | .SH NAME |
---|
| 6 | session_gate, end_session \- control lifetime of a session |
---|
| 7 | |
---|
| 8 | .SH SYNOPSIS |
---|
| 9 | .nf |
---|
[3889] | 10 | session_gate [-logout] |
---|
[3888] | 11 | end_session [ -force | -f ] |
---|
| 12 | .fi |
---|
| 13 | .SH DESCRIPTION |
---|
| 14 | |
---|
[3889] | 15 | \fISession_gate\fR is a process that waits for a user's session to |
---|
| 16 | end, and then optionally executes their logout script. Normally, |
---|
| 17 | \fIsession_gate\fR appears at or near the end of a session file used |
---|
| 18 | by \fIxlogin\fR(1). When used in this fashion, \fIsession_gate\fR |
---|
[11303] | 19 | should not be run in the background. If \fIsession_gate\fR is invoked |
---|
| 20 | with the \fI-logout\fR option, and there is a file \fI\&.logout\fR in |
---|
| 21 | the directory it was started in, it will execute that file before |
---|
| 22 | exiting. (For historical reasons, \fI/bin/athena/tcsh\fR will be used |
---|
| 23 | to interpret the file if it does not begin with a #! string.) |
---|
[3888] | 24 | |
---|
| 25 | \fIEnd_session\fR is a command that attempts to send a hangup signal to |
---|
| 26 | each \fIsession_gate\fR process that is running. Normally, the user |
---|
| 27 | invokes \fIend_session\fR to indicate that the current session is to be |
---|
| 28 | terminated. The \fIlogout\fR can be aliased (in the shell) to invoke |
---|
| 29 | \fIend_session\fR, for example. |
---|
| 30 | |
---|
| 31 | \fIEnd_session\fR determines the process id of each \fIsession_gate\fR |
---|
| 32 | process by reading the file /tmp/session_gate_pid.\fIuid\fR, where |
---|
| 33 | \fIuid\fR is the user's uid number. If the \fI-force\fR or \fI-f\fR option |
---|
| 34 | is specified, then a combination of \fIps\fR(1) and \fIawk\fR(1) is used |
---|
| 35 | for determining the process id's. |
---|
| 36 | |
---|
[3889] | 37 | Note that at Athena, the environment variable \fBXSESSION\fR is |
---|
| 38 | usually set to the process ID of the \fIsession_gate\fR so that logout |
---|
| 39 | is just aliased to 'kill -HUP $XSESSION' and \fIend_session\fR is now |
---|
| 40 | obsolete. |
---|
| 41 | |
---|
[3888] | 42 | .SH DIAGNOSTICS |
---|
| 43 | |
---|
[11303] | 44 | \fISession_gate\fR exits with status 0, or the status of the |
---|
| 45 | \fI\&.logout\fR script. |
---|
[3888] | 46 | |
---|
| 47 | \fIEnd_session\fR will exit with one of the following status values: |
---|
| 48 | .TP 5 |
---|
| 49 | 0 |
---|
| 50 | No error encountered. |
---|
| 51 | .TP 5 |
---|
| 52 | 1 |
---|
| 53 | Bad arguments. |
---|
| 54 | .TP 5 |
---|
| 55 | 2 |
---|
| 56 | No \fIsession_gate\fR processes found (\fI-force\fR or \fI-f\fR option). |
---|
| 57 | .TP 5 |
---|
| 58 | 3 |
---|
| 59 | The file /tmp/session_gate_pid.\fIuid\fR does not exist or is not readable. |
---|
| 60 | .TP 5 |
---|
| 61 | 4 |
---|
| 62 | The file /tmp/session_gate_pid.\fIuid\fR has been modified. |
---|
| 63 | .PP |
---|
| 64 | |
---|
| 65 | .SH FILES |
---|
| 66 | /tmp/session_gate_pid.\fIuid\fR |
---|
| 67 | |
---|
| 68 | .SH "SEE ALSO" |
---|
| 69 | \fIxlogin\fR(1) |
---|
| 70 | |
---|
| 71 | .SH AUTHOR |
---|
| 72 | .nf |
---|
| 73 | David J Flanagan, John E Elsbree |
---|
| 74 | MIT Project Athena |
---|
| 75 | Copyright 1989, Massachusetts Institute of Technology |
---|
| 76 | .fi |
---|
| 77 | |
---|
| 78 | .SH BUGS |
---|
| 79 | The \fI-force\fR (\fI-f\fR) option is, admittedly, a kludge. It is very |
---|
| 80 | dependent on the format of the output produced by \fIps\fR(1). |
---|