bug-bash
[Top][All Lists]
Advanced

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

Re: launched by rungetty bash breaks terminal input interpretation upon


From: Dumas Patrice
Subject: Re: launched by rungetty bash breaks terminal input interpretation upon runlevel change
Date: Tue, 4 Dec 2001 18:59:35 +0100
User-agent: Mutt/1.2.5i

On Tue, Dec 04, 2001 at 11:40:19AM -0500, Paul Jarc wrote:
> Dumas Patrice <address@hidden> wrote:
> > On Mon, Dec 03, 2001 at 11:23:48AM -0500, Paul Jarc wrote:
> >> Dumas Patrice <address@hidden> wrote:
> >> > #to show the problem
> >> > 1:3:respawn:/sbin/rungetty tty1  -u root -g root --noclear -- /bin/bash 
> >> > --login
> >> > 4:4:respawn:/sbin/rungetty tty1  -u root -g root --noclear -- 
> >> > /bin/start_test
> >>
> >> I think init doesn't like this.  The first field should correspond to
> >> the tty, so using id "4" with tty1 won't work.  It follows that you
> >
> > I sent a mail to the author of init (in linux) and he said that this wasn't
> > true, that the id was nothing more than a 4 char identifier.
> 
> What init are you using?  I know that isn't true for RedHat's
> SysVinit.  The identifier is also used for utmp accounting.  From the
> inittab man page:
>               Note:  For  gettys or other login processes, the id
>               field should be the tty suffix of the corresponding
>               tty,   e.g.  1  for  tty1.   Otherwise,  the  login
>               accounting might not work correctly.
> 
> Have you tried doing what I said?

No, but I think it would do the trick. 

However, it seems to me that utmp accounting does account for the tty line
using the:

char ut_line[UT_LINESIZE];    /* device name of tty - "/dev/" */

in the struct utmp, which is set by getty without reference to the id, 
but looking at the command line argument. In case the 

char ut_id[4];              /* init id or abbrev. ttyname */ 

isn't set up it put the abbreviated ttyname in, but no program should rely 
on this entry as it also could be the init id. Do you think some program
get the tty line using this field of utmp ?


Plus, I think it should be better to have everything work ok without utmp 
accounting. Is it normal that the terminal doesn't translate characters in 
the right way when there is no utmp accounting ? I can't see why it should 
be the case, it seems to me that the utmp accounting of the line/init id is for
information only and shouldn't lead to a change in the terminal settings.

I may be totally wrong, however, I am totally new with that stuff.

Pat



reply via email to

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