#include "../config.h"
#include "rxvt.h"
-#include "logging.h"
+#include "ptytty.h"
-#ifdef UTMP_SUPPORT
+#if UTMP_SUPPORT
#if HAVE_STRUCT_UTMP
static int rxvt_write_bsd_utmp (int utmp_pos, struct utmp *wu);
* make and write utmp and wtmp entries
*/
void
-rxvt_session::login (const char *pty, int cmd_pid, bool login_shell, const char *hostname)
+rxvt_ptytty::login (int cmd_pid, bool login_shell, const char *hostname)
{
this->cmd_pid = cmd_pid;
this->login_shell = login_shell;
+ const char *pty = name;
+
#ifdef HAVE_STRUCT_UTMP
struct utmp *ut = &this->ut;
#endif
* remove utmp and wtmp entries
*/
void
-rxvt_session::logout ()
+rxvt_ptytty::logout ()
{
#ifdef HAVE_STRUCT_UTMP
struct utmp *tmput, *ut = &this->ut;
rxvt_privileges (RESTORE);
if (action == SAVE)
- session.login (pty.name, cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]);
+ pty.login (cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]);
else
- session.logout ();
+ pty.logout ();
rxvt_privileges (IGNORE);
}