Cover V10, I07
Article
Listing 1

jul2001.tar


Listing 1 Sample utmp struct

struct utmp {
    char        ut_user[8];    /* login name */
    char        ut_id[4];      /* inittab ID */
    char        ut_line[12];   /* device name */
    short       ut_pid;        /* process ID */
    short       ut_type;       /* type of entry */
    struct exit_status ut_exit; /* exit status */
    time_t      ut_time;       /* time entry made */
};

struct exit_status {
    short       e_termination; /* termination status */
    short       e_exit;        /* exit status */
};