The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

Разъясните разницу в устройствах ttyS vs cua, pls. (tty linux)


<< Предыдущая ИНДЕКС Поиск в статьях src Установить закладку Перейти на закладку Следующая >>
Ключевые слова: tty, linux,  (найти похожие документы)
_ RU.LINUX (2:5077/15.22) ___________________________________________ RU.LINUX _ From : Boris Tobotras 2:5020/510 Thu 17 Apr 97 21:55 Subj : Re: Разъясните разницу в устройствах ttyS vs cua, pls. ________________________________________________________________________________ >>>>> "SO" == Serg Oskin <Serg_Oskin@f20.n5020.z2.fidonet.org> writes: SO> Борь, ты говорил, что в comp.linux.* базарили про это - возможно найти SO> краткий список аргументов обоих сторон? :) To: Tony Nugent <tonyn@sctnugen.ppp.gu.edu.au> Cc: linux-net@vger.rutgers.edu, linux-ppp@vger.rutgers.edu Subject: Re: /dev/cua? Vs /dev/ttyS? (was: Re: co-existance of pppd and mgetty ?) Date: Mon, 13 May 1996 19:51:04 +0200 Status: ROr Date: Mon, 13 May 1996 07:57:09 +1000 From: Tony Nugent <tonyn@sctnugen.ppp.gu.edu.au> Can someone kindly explain the difference between the /dev/cua? and /dev/ttyS? devices? /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. While this will allow for simple lockouts between a user using a modem for callout and a getty listening on the line for logins, it doesn't work if you need to arbitrate between multiple programs wanting to do dialout --- for example, users wanting to do dialout and UUCP. I originally implemented the cuaXX/ttySXX lockout mechanism back before FSSTND established a standard convention for the use of tty lock files. Now that it's there, people should use the tty lock files and not try using /dev/cuaXX. The only reason why /dev/cuaXX hasn't disappeared yet is for backwards compatibility reasons. - Ted -- Best regards, -- Boris. --- Gnus v5.4.37/XEmacs 19.15 * Origin: Linux inside (2:5020/510@fidonet)

<< Предыдущая ИНДЕКС Поиск в статьях src Установить закладку Перейти на закладку Следующая >>

 Добавить комментарий
Имя:
E-Mail:
Заголовок:
Текст:




Спонсоры:
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2020 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру