Hi, Generally, the basic idea is that each program that uses a serial port writes a file in /var/lock with the name, as I recall, LCK..portname. Inside that file, I believe, is stored the PID of that process. The file is removed when the port is no loinger used. Various serial port programs use this mechanism. I believe you could probably find out the mechanics by reading the source of one of them; perhaps minicom or some such. I used to know the exact mechanics of it but my memory is somewhat dim on the subject now. It also allows apps to co-exist peacefully with things like *getty.
-- John Julian Gilbey <[EMAIL PROTECTED]> writes: > John, > > You originally proposed the following amendment to policy: > > There is no mention of the UUCP-style locking required for serial > lines to prevent multiple communications programs from attempting to > use the same line at once. For a brief description of UUCP-style > serial locking, see the discussion for bug #10575. > > Now bug #10575 no longer exists, and I know nothing about this > subject. It is clear that this is an important matter and should not > just be dropped (as Ian pointed out recently). > > Could you please give more details of what the policy should say in > this regard? > > Julian > > -- > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > Julian Gilbey, Dept of Maths, QMW, Univ. of London. [EMAIL PROTECTED] > Debian GNU/Linux Developer, see http://www.debian.org/~jdg > Donate free food to the world's hungry: see http://www.thehungersite.com/ -- John Goerzen <[EMAIL PROTECTED]> www.complete.org Sr. Software Developer, Progeny Linux Systems, Inc. www.progenylinux.com #include <std_disclaimer.h> <[EMAIL PROTECTED]>