


SESSION_GATE(1)          USER COMMANDS            SESSION_GATE(1)



NAME
     session_gate, end_session - control lifetime of a session


SYNOPSIS
     session_gate [-logout]
     end_session [ -force | -f ]

DESCRIPTION
     _S_e_s_s_i_o_n__g_a_t_e is a process that waits for a user's session to
     end, and then optionally executes their logout script.  Nor-
     mally, _s_e_s_s_i_o_n__g_a_t_e appears at or near the end of a  session
     file   used  by  _x_l_o_g_i_n(1).   When  used  in  this  fashion,
     _s_e_s_s_i_o_n__g_a_t_e should  not  be  run  in  the  background.   If
     invoked  with  the -_l_o_g_o_u_t option, it will run a /_b_i_n/_c_s_h on
     the file ._l_o_g_o_u_t in the directory it was started in.

     _E_n_d__s_e_s_s_i_o_n is a command that attempts to send a hangup sig-
     nal to each _s_e_s_s_i_o_n__g_a_t_e process that is running.  Normally,
     the user invokes _e_n_d__s_e_s_s_i_o_n to indicate  that  the  current
     session  is to be terminated.  The _l_o_g_o_u_t can be aliased (in
     the shell) to invoke _e_n_d__s_e_s_s_i_o_n, for example.

     _E_n_d__s_e_s_s_i_o_n determines the process id of  each  _s_e_s_s_i_o_n__g_a_t_e
     process by reading the file /tmp/session_gate_pid._u_i_d, where
     _u_i_d is the user's uid number.  If the -_f_o_r_c_e or -_f option is
     specified,  then  a  combination of _p_s(1) and _a_w_k(1) is used
     for determining the process id's.

     Note that at Athena, the environment  variable  XSESSION  is
     usually  set  to  the process ID of the _s_e_s_s_i_o_n__g_a_t_e so that
     logout  is  just  aliased  to  'kill  -HUP  $XSESSION'   and
     _e_n_d__s_e_s_s_i_o_n is now obsolete.


DIAGNOSTICS
     _S_e_s_s_i_o_n__g_a_t_e always exits with status 0.

     _E_n_d__s_e_s_s_i_o_n will exit  with  one  of  the  following  status
     values:

     0    No error encountered.

     1    Bad arguments.

     2    No _s_e_s_s_i_o_n__g_a_t_e processes found (-_f_o_r_c_e or -_f option).

     3    The file /tmp/session_gate_pid._u_i_d does not exist or is
          not readable.

     4    The file /tmp/session_gate_pid._u_i_d has been modified.




MIT Project AthenaLast change: 30 November 1990                 1






SESSION_GATE(1)          USER COMMANDS            SESSION_GATE(1)



FILES
     /tmp/session_gate_pid._u_i_d


SEE ALSO
     _x_l_o_g_i_n(1)


AUTHOR
     David J Flanagan, John E Elsbree
     MIT Project Athena
     Copyright 1989, Massachusetts Institute of Technology


BUGS
     The -_f_o_r_c_e (-_f) option is, admittedly, a kludge.  It is very
     dependent on the format of the output produced by _p_s(1).






































MIT Project AthenaLast change: 30 November 1990                 2



