[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: who command misses tty1..kernel or sh-utils ?

From: Bill Pringlemeir
Subject: Re: who command misses tty1..kernel or sh-utils ?
Date: 23 Jul 2001 15:04:20 -0400
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.4

>>>>> "Roeland" == Roeland Th Jansen <address@hidden> writes:

 Roeland> who (GNU sh-utils) 2.0 Written by Joseph Arceneaux and David
 Roeland> MacKenzie.
 Roeland> who seems to loose interest in the fact that tty1 is also
 Roeland> being used.
 Roeland> I have seen this with many, if not all 2.4 kernels. this is
 Roeland> 2.4.6.  tty1 _is_ active :

I have discussed this with Roeland offline and we are both using XFree
4.02.  I start my system with runlevel 3 (and so does Roeland?) and
then we run `startx &'.  It is only after this that the `utmp' file
gets stomped.  I am not quite sure how this could be a kernel problem.
I don't know where the code would be that touches `utmp'.  I have sh-utils
versin 2.0 (freshly compiled) with Linux 2.4.7.  I also wrote this code,

    #include <stdio.h>
    #include <stdlib.h>
    #include <utmp.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <fcntl.h>
    #include <unistd.h>

    int main(int argc, char *argv[])
        int fd;
        struct utmp loginEntry;

        fd = open(_PATH_UTMP,O_RDONLY);
        if(fd >= 0) {
            while(read(fd,&loginEntry,sizeof(loginEntry))) {
                printf("type %d, ", loginEntry.ut_type);
                printf("pid %d, ", loginEntry.ut_pid);
                printf("line %s, ", loginEntry.ut_line);
                printf("id  %s, ", loginEntry.ut_id);
                printf("user %s, ", loginEntry.ut_user);
                printf("host %s\n", loginEntry.ut_host);
        else {
            printf("Cann't open " _PATH_UTMP);

        return 0;

I have attached the output of this code and my `ps -ef'.  You can see
from the ps output that there is a user logged on tty1.  I use lkml,
but not the sh-utils... feel free to contact me if you wish additional
information.  I always see this after running `X', never before.

Bill Pringlemeir.

Attachment: who.out
Description: who_test output.

Attachment: ps.out
Description: ps -ef output.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]