Print this page
3124 Remove any existing references to utmp, use utmpx instead

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/utmpd/utmpd.c
          +++ new/usr/src/cmd/utmpd/utmpd.c
↓ open down ↓ 23 lines elided ↑ open up ↑
  24   24   */
  25   25  
  26   26  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  27   27  /*        All Rights Reserved   */
  28   28  
  29   29  /*
  30   30   * Portions of such source code were derived from Berkeley 4.3 BSD
  31   31   * under license from the Regents of the University of California.
  32   32   */
  33   33  
  34      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  35      -
  36   34  /*
  37   35   * utmpd        - utmp daemon
  38   36   *
  39   37   *              This program receives requests from  pututxline(3)
  40   38   *              via a named pipe to watch the process to make sure it cleans up
  41   39   *              its utmpx entry on termination.
  42   40   *              The program keeps a list of procs
  43   41   *              and uses poll() on their /proc files to detect termination.
  44   42   *              Also the  program periodically scans the /etc/utmpx file for
  45   43   *              processes that aren't in the table so they can be watched.
↓ open down ↓ 906 lines elided ↑ open up ↑
 952  950  static void
 953  951  clean_utmpx_ent(u)
 954  952          struct utmpx *u;
 955  953  {
 956  954          dprintf(("      clean_utmpx_ent: %d\n", (int)u->ut_pid));
 957  955          u->ut_type = DEAD_PROCESS;
 958  956          (void) time(&u->ut_xtime);
 959  957          (void) pututxline(u);
 960  958          updwtmpx(WTMPX_FILE, u);
 961  959          /*
 962      -         * XXX update wtmp for ! nonuser entries?
      960 +         * XXX update wtmp for ! nonuserx entries?
 963  961           */
 964  962  }
 965  963  
 966  964  /*
 967  965   *              *** Error Handling and Debugging Routines ***
 968  966   */
 969  967  
 970  968  /*
 971  969   * fatal - Catastrophic failure
 972  970   */
↓ open down ↓ 112 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX