uucp

Leslie Mikesell les at chinet.chi.il.us
Sat Mar 11 09:20:44 AEST 1989


In article <754 at oracle.oracle.com> ehoward at oracle.UUCP (Elliot Howard) writes:

>I know cu and uugetty create a lock file (/usr/spool/lock/LCK..tty* on the
>6386) to keep other processes from using an assigned port. I am also doing
>this, and yet uugetty persists in trying to read and write the tty port at
>the same time I am, causing random characters to go to each process

The lockfile contains the process ID of the program that created it.  HDB
uucp uses an ascii format 10 characters wide with the number right
justified, filled with spaces on the left.  If you find such a lock
file for the port you want, you can tell if the process that created it
is still running by doing a kill(pid,0) and checking the return status
(be sure to check errno to see if the reason for failure is EPERM or
ESRCH).

Les Mikesell



More information about the Comp.unix.questions mailing list