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

Re: diald and pppd problems



Jeffrey Ebert <jebert@ix.netcom.com> writes:
[Reports a problem with diald and ppp-2.2.0c not working, and failing
with "PPP not available" messages, yet pppd works fine from the command line.]
>Eric Schenk wrote:
>> (2) There were reports of a problem when starting pppd from inittab.
>>     This was a result of pppd relying on having a controlling terminal,
>>     which it does not when started from inittab. This problem may
>>     be related to what you are seeing. The way the test code is
>>     written the ppp_available routine would fail if it was run and it
>>     could not actually open /dev/cua0.
>>
>>         Check the following:
>>         the permissions on /dev/cua0.
>>         that you are running diald as root.
>>      You might also try running diald with /dev/ttyS0 instead (this is
>>      a shot in the dark, but it's worth a try).
>      If any of this works I'll be happy to explain why :-)
>
>Thanks for the help, Eric. I am now executing diald with /dev/ttyS0 and
>it works very nicely. Now, how about the explanation?

Ok. Here is what I think is happening (I haven't tested this yet, but
it makes sense to me). Ppd needs to open up a terminal line at various
times, just to be able to do various ioctl's. Most critically this occurs
in ppp_available. Now, the way pppd gets a terminal is it opens the controling
terminal /dev/tty. When pppd is invoked from the command line this doesn't
cause a problem. But, when pppd is invoked by diald, the controling terminal
IS /dev/cua0. Since /dev/cua0 can't be opened by multiple processes at once,
and it is already open, the reopen fails. Panic ensues.

In any case, I'll look further into this and see if I can't set things up so
diald doesn't cause this problem to occur. In the worst case, if I can't avoid
this problem, I'll at least document it in the FAQ (and change the manual
page examples so they don't use /dev/cua*).

Thanks for reporting this,

-- eric


---------------------------------------------------------------------------
Eric Schenk                          www: http://www.cs.toronto.edu/~schenk
Department of Computer Science	               email: schenk@cs.toronto.edu
University of Toronto


Reply to: