Michal Mertl píše v pá 03. 02. 2006 v 00:29 +0100: > I found a couple of display issues with the new pts type ptys. > > wall and who - don't check the utmp tty validity (see also PR bin/84041) > The attached patch duplicates the check from the w program in who and > wall. For some reason closed pts ttys are displayed/printed to when > there wasn't a problem with the old pty implementation. I forgot to properly describe the bug :-). who and wall displays/prints to already detached pty. E.g. I open an gnome-terminal window and close it. Then when I call who in another window the just closed pty is listed as active. Example: ------ mime_at_genius /usr/home/mime$ who mime pts/1 1 úno 18:50 (:0.0) mime pts/2 2 úno 01:54 (:0.0) mime pts/3 2 úno 16:06 (:0.0) mime pts/4 2 úno 16:44 (:0.0) mime pts/5 2 úno 23:21 (:0.0) mime :0 1 úno 18:46 ------ mime_at_genius /usr/home/mime$ wall a Broadcast Message from mime_at_genius... (/dev/pts/4) at 10:20 CET... a wall: /dev/pts/5: No such file or directory wall: /dev/:0: No such file or directory ---- "w" is correct: ------ mime_at_genius /usr/home/mime$ w 10:20dp up 1 day, 9:26, 4 users, load averages: 0,98 0,45 0,38 USER TTY FROM LOGIN_at_ IDLE WHAT mime pts/1 :0.0 st06od 31 bash mime pts/2 :0.0 čt01dp 31 ssh .. mime pts/3 :0.0 čt04od 51 [ssh] mime pts/4 :0.0 čt04od - w ------ I also have just confirmed there is also one more bug - I don't see all the ptys - I probably didn't investigate it enough but it seems that pts/0 is never displayed by w, who or wall. It is correct is last output though and ps also shows the processes running on it. I think that whatever writes to /var/tmp/utmp doesn't write pts/0 lines to it (so w, who and wall don't see it) but they are written correctly to /var/log/wtmp (so last sees it). I see now that the patches I sent out aren't a complete solution too all the issues. I will continue looking into it. > > ps - the TT column displays garbage (always "pts") > The attached patch trims "pts/" from the tty name. The printout doesn't > look nice ("10443 pts IWs 0:00,00 bash" changes to "10443 3 IWs > 0:00,00 bash") but the field width is 4 which doesn't allow much. The > right solution would probably involve removing TT column and always use > the longer version TTY with width of 8 (which allows to correctly > display "pts/3"). I checked Solaris 10 and it displays the full tty name > by default. > > Regards > > MichalReceived on Fri Feb 03 2006 - 09:01:48 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:51 UTC