[fa.laser-lovers] imagen software

stevesu%rand-relay@bronze.UUCP (11/25/83)

From: bronze!stevesu@rand-relay
A number of people have been praising the Imagen corp's software
support and, while it is pretty good, it's got a serious problem
you should know about if you're using one.  Virtually all of the
programs (catdvi, dviimp, ipr, ipd, and ips) have an inexcusable
bug in the way they catch signals (i.e. control-c interrupts). 
They catch these signals unconditionally, and abort and clean up
nicely, without checking to see if the signal was already being
ignored.  If you put an imagen job in the background using &, the
shell will turn off interrupts for the job, but they will get
turned right back on again and the background imagen job will get
killed whenever you type control-c to kill another foreground
job.  See my article azure.2327 in the unix-wizards newsgroup, or
read page 16 of the paper "Unix Programming" in volume two of
your Unix Programmer's Manual, for more explanation.

The fix is simple -- in each of the above-mentioned programs
(catdvi.c, dviimp.c, ipr.c, ipd.c, and ips.c) change the lines
that look like

	signal(SIGNAL, catchroutine);

where SIGNAL is SIGINT, SIGQUIT, SIGHUP, or SIGTERM and
catchroutine is GoAway or Terminate or something, to

	if(signal(SIGNAL, SIG_IGN) != SIG_IGN)
		signal(SIGNAL, catchroutine);

I'd distribute my modified sources but I don't think I should
since I don't know what kind of non-disclosure agreements we've
signed.

There are several other problems involving the tag and banner
arguments to the various commands.  When I do an itroff, the file
listed on the banner page is not the file I formatted but the
temporary file used to collect the output.  The programs were all
written by different people and it looks like they were thrown
together without quite enough integration and testing.

I have to give the Imagen Co. credit -- the stuff works really
well, when it works.  The first itroff I tried came out
perfectly.  The problems I mentioned, though, really shouldn't
appear in production software.
                                         Steve Summit
                                         Tektronix, Inc.
                                         tektronix!tekmdp!stevesu