1 --- kterm-6.2.0/main.c.utempter Fri Mar 26 12:11:35 1999
2 +++ kterm-6.2.0/main.c Fri Mar 26 12:14:50 1999
3 @@ -1679,11 +1679,12 @@
4 * has problems, we can re-enter this function and get another one.
14 +#if defined(__osf__) || defined(linux)
15 return (openpty(pty, &tty, ttydev, NULL, NULL));
17 #if defined(SYSV) && defined(i386) && !defined(SVR4)
19 #endif /* TIOCSWINSZ */
22 + addToUtmp(ttydev, NULL, screen->respond);
26 if (pipe(pc_pipe) || pipe(cp_pipe))
27 @@ -2927,85 +2930,6 @@
32 - /* set up entry to search for */
35 - if (PTYCHARLEN >= (int)strlen(ptyname))
36 - ptynameptr = ptyname;
38 - ptynameptr = ptyname + strlen(ptyname) - PTYCHARLEN;
39 - (void) strncpy(utmp.ut_id, ptynameptr, sizeof (utmp.ut_id));
41 - (void) strncpy(utmp.ut_id,ptyname + sizeof("/dev/tty")-1,
42 - sizeof (utmp.ut_id));
45 - utmp.ut_type = DEAD_PROCESS;
47 - /* position to entry in utmp file */
48 - (void) getutid(&utmp);
50 - /* set up the new entry */
51 - utmp.ut_type = USER_PROCESS;
53 - utmp.ut_exit.e_exit = 2;
55 - (void) strncpy(utmp.ut_user,
56 - (pw && pw->pw_name) ? pw->pw_name : "????",
57 - sizeof(utmp.ut_user));
60 - (void)strncpy(utmp.ut_id, ptynameptr, sizeof(utmp.ut_id));
62 - (void) strncpy(utmp.ut_id,ptyname + sizeof("/dev/tty")-1,
63 - sizeof (utmp.ut_id));
65 - (void) strncpy (utmp.ut_line,
66 - ptyname + strlen("/dev/"), sizeof (utmp.ut_line));
68 -#ifdef HAS_UTMP_UT_HOST
69 - (void) strncpy(buf, DisplayString(screen->display),
73 - char *disfin = strrchr(buf, ':');
78 - (void) strncpy(utmp.ut_host, buf, sizeof(utmp.ut_host));
80 - (void) strncpy(utmp.ut_name, pw->pw_name,
81 - sizeof(utmp.ut_name));
83 - utmp.ut_pid = getpid();
85 - utmp.ut_session = getsid(0);
86 - utmp.ut_xtime = time ((Time_t *) 0);
87 - utmp.ut_tv.tv_usec = 0;
89 - utmp.ut_time = time ((Time_t *) 0);
92 - /* write out the entry */
93 - if (!resource.utmpInhibit)
94 - (void) pututline(&utmp);
97 - if (term->misc.login_shell)
98 - updwtmpx(WTMPX_FILE, &utmp);
100 - if (term->misc.login_shell &&
101 - (i = open(etc_wtmp, O_WRONLY|O_APPEND)) >= 0) {
102 - write(i, (char *)&utmp, sizeof(struct utmp));
107 - /* close the file */
110 #else /* USE_SYSV_UTMP */
111 /* We can now get our ttyslot! We can also set the initial
113 @@ -3420,39 +3344,7 @@
114 #endif /* USE_HANDSHAKE */
117 - utmp.ut_type = USER_PROCESS;
118 - if (PTYCHARLEN >= (int)strlen(ptyname))
119 - ptynameptr = ptyname;
121 - ptynameptr = ptyname + strlen(ptyname) - PTYCHARLEN;
122 - (void) strncpy(utmp.ut_id, ptynameptr, sizeof(utmp.ut_id));
124 - utptr = getutid(&utmp);
125 - /* write it out only if it exists, and the pid's match */
126 - if (utptr && (utptr->ut_pid == screen->pid)) {
127 - utptr->ut_type = DEAD_PROCESS;
129 - utmp.ut_session = getsid(0);
130 - utmp.ut_xtime = time ((Time_t *) 0);
131 - utmp.ut_tv.tv_usec = 0;
133 - utptr->ut_time = time((Time_t *) 0);
135 - (void) pututline(utptr);
138 - updwtmpx(WTMPX_FILE, &utmp);
140 - /* set wtmp entry if wtmp file exists */
141 - if ((fd = open(etc_wtmp, O_WRONLY | O_APPEND)) >= 0) {
142 - i = write(fd, utptr, sizeof(utmp));
152 #else /* not USE_SYSV_UTMP */
154 --- kterm-6.2.0/Imakefile.utempter Fri Jul 12 01:01:04 1996
155 +++ kterm-6.2.0/Imakefile Fri Mar 26 12:11:35 1999
160 + PTYLIB = -lutempter -lutil
162 OSMAJORVERSION = OSMajorVersion
163 OSMINORVERSION = OSMinorVersion