Getty and PPP
Denys Vlasenko
vda.linux at googlemail.com
Fri Oct 21 17:22:23 UTC 2011
On Tue, Sep 27, 2011 at 11:38 PM, Harald Becker <ralda at gmx.de> wrote:
> Hallo Denys!
>
> On 26.09.2011 19:41, Peter LaDow wrote:
>> getty -i -h -n -I 'ATE0Q1&D2&C1S0=1\015' -l /usr/bin/startppp 115200 /dev/ttyS1
>>
>> Is there any reason that getty would not wait? I don't have the '-L'
>> so it seems it should wait for carrier detect.
It doesn't wait because we open tty with O_NONBLOCK.
I don't know why we do that.
agetty also does this. So it seems it's not a busybox deviation.
> -I INITSTR Send INITSTR before anything else
>
> As a suggestion -- could be better to cange this to read:
>
> -I INITSTR Send terminal INITSTR before anything else
>
> or
>
> -I INITSTR Send terminal (NOT modem) INITSTR before anything else
>
> or
>
> -I INITSTR Send terminal INITSTR before anything else (NOT for modem)
I do not understand what are you trying to say in that text.
We can't know where INITSTR goes (to modem or to whatever is connected
to that modem) - we merely send these bytes to the tty.
One related gray area is whether we should use open(O_NONBLOCK)
or not, and if not, what to do with INITSTR then: it will no longer be sent
to tty immediately, but only after open() succeeds (which on !CLOCAL
lines means "after Carrier Detect appears") - meaning that INITSTR
can no longer be used to initialize modems.
--
vda
More information about the busybox
mailing list