File: debian.device

package info (click to toggle)
diald 0.99.4-7.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,100 kB
  • ctags: 935
  • sloc: ansic: 7,109; tcl: 977; sh: 880; perl: 306; makefile: 109
file content (102 lines) | stat: -rw-r--r-- 4,554 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#	$Id: debian.device,v 1.1 2000/02/21 03:52:51 jeff Exp $	


This exchange of messages should help clarify the problem people have
been experiencing with diald. Bottom line: DO NOT USE /dev/cua? devices.

--

Date:    Mon, 20 Nov 1995 15:05:32 EST
To:      Jeffrey Ebert <jebert@ix.netcom.com>
cc:      debian-user@Pixar.com, giuseppe@deselby.xs4all.nl,
         linux-diald@vger.rutgers.edu

From:    "Eric Schenk" <schenk@cs.toronto.edu>
Subject: Re: diald and pppd problems

Return-Path: estsa2.estec.esa.nl!gvacanti
Return-Path: <estsa2.estec.esa.nl!gvacanti>
Resent-Sender: estsa2.estec.esa.nl!gvacanti
Resent-Date: Mon, 20 Nov 1995 15:05:32 -0500
Old-Return-Path: <schenk@cs.toronto.edu>
In-Reply-To: Your message of "Mon, 20 Nov 1995 14:39:00 EST."
         <30B0D954.1D1CDB3B@ix.netcom.com>
Resent-Message-Id: <"374OUB.A.WOE.y-Nsw"@mongo>
Resent-From: debian-user@Pixar.com
X-Mailing-List: <debian-user@Pixar.com> archive/latest/2829
X-Loop:  debian-user@Pixar.com
Precedence: list
Resent-Sender: debian-user-request@Pixar.com


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

----------------------------------------------------------------------
From: ncm@cantrip.org (Nathan Myers)

   Can someone kindly explain the difference between the /dev/cua? and
   /dev/ttyS? devices?

Ted T'so Mon (13 May 1996):
/dev/ttySxx devices are fully POSIX-compliant TTY devices.  If you are
only going to be using one set of tty devices, you should be using
/dev/ttySxx. 

/dev/cuaXX devices are different from /dev/ttySXX in two ways --- first
of all, they will allow you to open the device even if CLOCAL is not set
and the O_NONBLOCK flag was not given to the open device.  This allows
programs that don't use the POSIX-mondated interface for opening
/dev/ttySxx devices to be able to use /dev/cuaXX to make outgoing phone
calls on their modem (cu stands for "callout", and is taken from SunOS).

The second way in which /dev/cuaXX differs from /dev/ttySXX is that if
they are used, they will trigger a simplistic kernel-based locking
scheme:  If /dev/ttySXX is opened by one or more processes, then an
attempt to open /dev/cuaXX will return EAGAIN.  If /dev/cuaXX is opened
by one or more processes, then an attempt to open /dev/ttySXX will
result the open blocking until /dev/cuaXX is closed, and the carrier
detect line goes high.
-----------------------------------------------------------------------