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.30 by root, Tue Jan 17 11:02:10 2006 UTC vs.
Revision 1.31 by root, Tue Jan 17 15:17:39 2006 UTC

163 endutxent (); /* close the file */ 163 endutxent (); /* close the file */
164 utmp_pos = 0; 164 utmp_pos = 0;
165#endif 165#endif
166 166
167#if defined(HAVE_STRUCT_UTMP) && !defined(HAVE_UTMP_PID) 167#if defined(HAVE_STRUCT_UTMP) && !defined(HAVE_UTMP_PID)
168
169 { 168 {
170# ifdef HAVE_TTYSLOT 169# ifdef HAVE_TTYSLOT
170 int fdstdin = dup (STDIN_FILENO);
171 dup2 (pty->tty, STDIN_FILENO);
172
171 i = ttyslot (); 173 i = ttyslot ();
172 if (rxvt_write_bsd_utmp (i, ut)) 174 if (rxvt_write_bsd_utmp (i, ut))
173 utmp_pos = i; 175 utmp_pos = i;
176
177 dup2 (fdstdin, STDIN_FILENO);
178 close (fdstdin);
174# else 179# else
175 FILE *fd0; 180 FILE *fd0;
176 181
177 if ((fd0 = fopen (TTYTAB_FILENAME, "r")) != NULL) 182 if ((fd0 = fopen (TTYTAB_FILENAME, "r")) != NULL)
178 { 183 {
179 char buf[256], name[256]; 184 char buf[256], name[256];
180 185

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines