Here are some subroutines which a program can call to limit
multiple invocations of itself to one per user and/or N total
invocations.  I hope the usage is clear from the comments.
As an example, I added

	#ifndef NROFF
		(void)ublock(".tru");
		(void)nblock(".trn");
	#endif

To the troff source file n1.c just before the setjmp.  (If you use both
ublock() and nblock(), use them in that order!)  Then I created empty
public-write files called /usr/spool/locks/trn.{1,2,...} to determine
how many troff's would be allowed to run simultaneously.
_____________________________________________________
Matt		University	crawford@anl-mcs.arpa
Crawford	of Chicago	ihnp4!oddjob!matt
