Xref: utzoo comp.unix.wizards:22312 comp.unix.i386:5639 comp.unix.xenix:11918 Path: utzoo!attcan!uunet!mtndew!friedl From: friedl@mtndew.UUCP (Stephen J. Friedl) Newsgroups: comp.unix.wizards,comp.unix.i386,comp.unix.xenix Subject: Re: lpadmin(8) question Message-ID: <434@mtndew.UUCP> Date: 5 Jun 90 15:32:53 GMT References: <453@van-bc.UUCP> <1492@mitisft.Convergent.COM> <475@van-bc.wimsey.bc.ca> Followup-To: comp.unix.wizards Organization: VSIFAX Tech Center Lines: 18 Stuart Lynne writes: > The other commonly suggested method is to implement a lock in the interface > script, so that no more than one process can proceed and output to the > physical device at one time. > > [ description of script deleted ] Better than using lock files is to use file locks on the tty (stdout). This way you get guaranteed mutual exclusion, and if the process holding the lock dies, cleanup is automatic. A C program can do this easily. Steve -- Stephen J. Friedl, KA8CMY / Software Consultant / Tustin, CA / 3B2-kind-of-guy +1 714 544 6561 / friedl@mtndew.Tustin.CA.US / {uunet,attmail}!mtndew!friedl "I will defend to your death my right to my opinion" - me