repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: 6b04a91314000a6f4ab266f5123413fcd10e8872: path_to: revision_to:
commit 6b04a91314000a6f4ab266f5123413fcd10e8872 Author: Emanuele GiaquintaDate: Wed Jan 18 16:34:53 2006 +0000 *** empty log message *** diff --git a/src/feature.h b/src/feature.h
--- a/src/feature.h +++ b/src/feature.h @@ -257,6 +257,11 @@ */ #define RESET_TTY_TO_COMMON_DEFAULTS +/* + * Only log in wtmp and lastlog files when we're a login shell (-ls option) + */ +#define LOG_ONLY_ON_LOGIN + /*--------------------------------BELL----------------------------------*/ /* * Disable all bell indications diff --git a/src/logging.C b/src/logging.C
--- a/src/logging.C
+++ b/src/logging.C
@@ -205,7 +205,9 @@ rxvt_ptytty_unix::login (int cmd_pid, bool login_shell, const char *hostname)
#endif
#ifdef WTMP_SUPPORT
+#ifdef LOG_ONLY_ON_LOGIN
if (login_shell)
+#endif
{
# ifdef HAVE_STRUCT_UTMP
# ifdef HAVE_UPDWTMP
@@ -220,7 +222,9 @@ rxvt_ptytty_unix::login (int cmd_pid, bool login_shell, const char *hostname)
}
#endif
#if defined(LASTLOG_SUPPORT) && defined(RXVT_LASTLOG_FILE)
+#ifdef LOG_ONLY_ON_LOGIN
if (login_shell)
+#endif
rxvt_update_lastlog (RXVT_LASTLOG_FILE, pty, hostname);
#endif
}
@@ -279,7 +283,9 @@ rxvt_ptytty_unix::logout ()
* Write ending wtmp entry
*/
#ifdef WTMP_SUPPORT
+#ifdef LOG_ONLY_ON_LOGIN
if (login_shell)
+#endif
{
# ifdef HAVE_STRUCT_UTMP
# ifdef HAVE_UPDWTMP
-----END OF PAGE-----