[comp.unix.aux] releasing serial ports after killing cu

rprohask@orion.oac.uci.edu (Robert Prohaska) (11/24/90)

How do I recover control of a serial port (tty0) after terminating a session
with cu?  At present the port is busy until I call init 1.  I then wait a bit,
call init 2, wait some more and then the port becomes available.

When cu starts (or tried to start) a message is presented on the console:

"tty0 has been locked by pid xxxxxxxxxxx"

The lock action seems to be of some general type, because it happened during
an emacs session and emacs recongized the locking amd asked if I wanted to 
permit it.

Ideas?   suggestions?      help!!!!!!!!!!!

bob prohaska

alexis@panix.uucp (Alexis Rosen) (11/26/90)

cu (and all the other programs that respect uucp's locking protocol) creates
lock files in /usr/spool/uucp. If it grabs tty1, it will make a file called
LCK..tty1 and place in it its process ID.

Unfortunately, cu is broken, as are some (all) of the other programs. They are
supposed to check for (and remove) stale locks, but they don't.

---
Alexis Rosen
Owner/Sysadmin, PANIX Public Access Unix, NY
{cmcl2,apple}!panix!alexis