66 |
strncpy(utx.ut_line, line, sizeof(utx.ut_line)); |
strncpy(utx.ut_line, line, sizeof(utx.ut_line)); |
67 |
|
|
68 |
if (ut = getutline(&utx)) { |
if (ut = getutline(&utx)) { |
69 |
|
#ifdef HAVE_UTMP_UT_TYPE |
70 |
ut->ut_type = DEAD_PROCESS; |
ut->ut_type = DEAD_PROCESS; |
71 |
|
#endif |
72 |
#ifdef HAVE_UTMP_UT_EXIT |
#ifdef HAVE_UTMP_UT_EXIT |
73 |
ut->ut_exit.e_termination = 0; |
ut->ut_exit.e_termination = 0; |
74 |
ut->ut_exit.e_exit = 0; |
ut->ut_exit.e_exit = 0; |
75 |
#endif |
#endif |
76 |
|
#ifdef HAVE_UTMP_UT_TV |
77 |
|
gettimeofday (&(utx.ut_tv), 0); |
78 |
|
#else |
79 |
time(&(utx.ut_time)); |
time(&(utx.ut_time)); |
80 |
|
#endif |
81 |
pututline(ut); |
pututline(ut); |
82 |
|
#ifdef HAVE_UPDWTMP |
83 |
updwtmp(WTMP_FILE, ut); |
updwtmp(WTMP_FILE, ut); |
84 |
|
#endif /* XXX #else logwtmp ? */ |
85 |
} |
} |
86 |
endutent(); |
endutent(); |
87 |
#endif |
#endif |