ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/logging.C
(Generate patch)

Comparing rxvt-unicode/src/logging.C (file contents):
Revision 1.14 by root, Wed Feb 16 20:32:05 2005 UTC vs.
Revision 1.15 by root, Wed Feb 16 21:21:43 2005 UTC

137#ifdef HAVE_STRUCT_UTMPX 137#ifdef HAVE_STRUCT_UTMPX
138 strncpy (utx->ut_line, pty, sizeof (utx->ut_line)); 138 strncpy (utx->ut_line, pty, sizeof (utx->ut_line));
139 strncpy (utx->ut_user, (pwent && pwent->pw_name) ? pwent->pw_name : "?", 139 strncpy (utx->ut_user, (pwent && pwent->pw_name) ? pwent->pw_name : "?",
140 sizeof (utx->ut_user)); 140 sizeof (utx->ut_user));
141 strncpy (utx->ut_id, ut_id, sizeof (utx->ut_id)); 141 strncpy (utx->ut_id, ut_id, sizeof (utx->ut_id));
142# if HAVE_UTMPX_SESSION
142 utx->ut_session = getsid (0); 143 utx->ut_session = getsid (0);
144# endif
143 utx->ut_tv.tv_sec = time (NULL); 145 utx->ut_tv.tv_sec = time (NULL);
144 utx->ut_tv.tv_usec = 0; 146 utx->ut_tv.tv_usec = 0;
145 utx->ut_pid = cmd_pid; 147 utx->ut_pid = cmd_pid;
146# ifdef HAVE_UTMPX_HOST 148# ifdef HAVE_UTMPX_HOST
147 strncpy (utx->ut_host, hostname, sizeof (utx->ut_host)); 149 strncpy (utx->ut_host, hostname, sizeof (utx->ut_host));
208# else 210# else
209 rxvt_update_wtmp (RXVT_WTMP_FILE, ut); 211 rxvt_update_wtmp (RXVT_WTMP_FILE, ut);
210# endif 212# endif
211# endif 213# endif
212# ifdef HAVE_STRUCT_UTMPX 214# ifdef HAVE_STRUCT_UTMPX
215# if HAVE_UPDWTMPX
213 updwtmpx (RXVT_WTMPX_FILE, utx); 216 updwtmpx (RXVT_WTMPX_FILE, utx);
217# endif
214# endif 218# endif
215 } 219 }
216#endif 220#endif
217#if defined(LASTLOG_SUPPORT) && defined(RXVT_LASTLOG_FILE) 221#if defined(LASTLOG_SUPPORT) && defined(RXVT_LASTLOG_FILE)
218 if (options & Opt_loginShell) 222 if (options & Opt_loginShell)
262 strncpy (utx->ut_id, ut_id, sizeof (utx->ut_id)); 266 strncpy (utx->ut_id, ut_id, sizeof (utx->ut_id));
263 utx->ut_type = USER_PROCESS; 267 utx->ut_type = USER_PROCESS;
264 if ((tmputx = getutxid (utx))) /* position to entry in utmp file */ 268 if ((tmputx = getutxid (utx))) /* position to entry in utmp file */
265 utx = tmputx; 269 utx = tmputx;
266 utx->ut_type = DEAD_PROCESS; 270 utx->ut_type = DEAD_PROCESS;
271# if HAVE_UTMPX_SESSION
267 utx->ut_session = getsid (0); 272 utx->ut_session = getsid (0);
273# endif
268 utx->ut_tv.tv_sec = time (NULL); 274 utx->ut_tv.tv_sec = time (NULL);
269 utx->ut_tv.tv_usec = 0; 275 utx->ut_tv.tv_usec = 0;
270#endif 276#endif
271 277
272 /* 278 /*
283# else 289# else
284 rxvt_update_wtmp (RXVT_WTMP_FILE, ut); 290 rxvt_update_wtmp (RXVT_WTMP_FILE, ut);
285# endif 291# endif
286# endif 292# endif
287# ifdef HAVE_STRUCT_UTMPX 293# ifdef HAVE_STRUCT_UTMPX
294# if HAVE_UPDWTMPX
288 updwtmpx (RXVT_WTMPX_FILE, utx); 295 updwtmpx (RXVT_WTMPX_FILE, utx);
296# endif
289# endif 297# endif
290 } 298 }
291#endif 299#endif
292 300
293 /* 301 /*

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines