Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site stcvax.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!hao!stcvax!lat From: lat@stcvax.UUCP (Larry Tepper) Newsgroups: net.unix-wizards Subject: Re: hazards of linking directories Message-ID: <310@stcvax.UUCP> Date: Wed, 10-Oct-84 16:20:08 EDT Article-I.D.: stcvax.310 Posted: Wed Oct 10 16:20:08 1984 Date-Received: Fri, 12-Oct-84 05:20:45 EDT References: <12762@sri-arpa.UUCP>, <172@rlgvax.UUCP> Organization: Storage Technology Corp. Louisville, CO Lines: 39 We have an 11/70 running V7 here. Response on the system was bad enough, and our users were getting frustrated having to wait minutes just because they needed something like: pr *.c | lpr or tbl bunch of files | nroff -ms > output; lpr output So, we basically rewrote lpr, lpd (and added lpf, the filter which does the real printing) to our V7 system. We don't link to files, but rather put the full pathname of each file into the daemon control file. I added a flag so that the line printer filter will do simple pagination of files (as in the example above, but no columnation). The line printer filter (lpf) has to be a root-owned setuid program. Shortly after it starts up, it sets its uid/gid to the originator of the printing job (using the owner and group of the daemon control file for the job). The system also handles multiple printers and will print over our network (we've been running 3-COM's UNET for years; and we have a ton of pdp-11's here). Identical code runs on our 4.1 BSD systems. I won't apologize to purists who insist that the line printer shouldn't do pagination. It already prints a (not so) fancy banner for you. 95% of the line printer jobs that people used to run were like the pr example above. Now they look like lpr -p *.c I would bet that the example I gave is also 95% of what pr is used for. Printer jobs now run a LOT faster, they don't bog down the system when it's already slow, and the code to get it right cost us all of 40 lines, including handling the -p flag in lpr, defining the flag in a header file, etc. In addition, we no longer have to worry about running out of space in /usr. -- Violence is the last refuge of the incompetent. {ihnp4 hao philabs sdcrdcf ucbvax!nbires}!stcvax!lat Larry Tepper Storage Technology, MD-3T, Louisville, CO 80028 303-673-5435