There appears to be a bug in lpr in DEC OSF/1 V1.3, V2.0 and V3.0: if
you specify both the ``-r'' (remove) and ``-s'' (symlink) options to it,
the file in question and/or its symlink are removed before the printing
starts and nothing gets printed. (However, using either option by
itself seems to work okay).
I've worked around this by modifying lwsrv to only use the ``-s'' option
if USESYMLINK (a new option, off by default) is #define'ed (I've also
redefined TEMPFILE to /usr/tmp because if lpr removes symlinks before
printing them but leaves the original files around, /tmp [and hence /]
gets filled up pretty quickly; besides /usr/tmp is usually larger than
/tmp [I didn't use /var/tmp because some systems don't have it yet]).
The changes are included below.
I also had problems with aufs which was running on an Alpha with DEC
OSF/1 V2.0 but with files residing on an NFS mounted disk attached
to a DECstation running Ultrix 4.2, with the following errors appearing
in Alpha's log files
vmunix: lock-manager: RPC error: (11) RPC: Server can't decode arguments
and the Mac hanging (requiring a power cycle to bring it back to life).
This also seemed to foul up the lock daemons on the DECstation and/or
the Alpha, so that the daemons had to be killed and restarted. (The
problem did not occur with a local disk attached directly to the Alpha.)
Fortunately, we replaced the DECstation with an Alpha and problem went
away. (As an aside, however, statd was seeing ghost [non existent]
entries in /etc/sm and /etc/sm.bak on the DECstation and I had to remove
and recreate those directories before it would start.)
P.S. I'm also including/reposting my patch to lwsrv's simple.c
to make it work with older PostScript/TransScript software
which requires that the first line of a PostScript file be
just ``%!'' rather than ``%!Adobe-...''
*** lwsrv.c.orig Fri Apr 8 21:37:06 1994
--- lwsrv.c Fri Dec 2 00:32:08 1994
***************
*** 107,113 ****
private int srefnum;
#ifndef TEMPFILE
! # define TEMPFILE "/tmp/lwsrvXXXXXX" /* temporary file holds job */
#endif TEMPFILE
#define RFLOWQ atpMaxNum
--- 107,113 ----
private int srefnum;
#ifndef TEMPFILE
! # define TEMPFILE "/usr/tmp/lwsrvXXXXXX" /* temporary file holds job */
#endif TEMPFILE
#define RFLOWQ atpMaxNum
***************
*** 1088,1096 ****
--- 1088,1099 ----
#endif xenix5
if (rhbuf[1] != '\0')
childargv[argc++]=rhbuf; /* include h and/or r flags */
+ #ifdef USESYMLINK
+ /* DEC OSF 2.0/3.0 bug: "lpr -r -s file" removes file *BEFORE* printing it */
#ifndef USESYSVLP
childargv[argc++]="-s"; /* better for > 1M files */
#endif USESYSVLP
+ #endif USESYMLINK
#ifdef LPRARGS
while(*lprargs)
childargv[argc++] = *lprargs++;
*** simple.c.orig Fri Apr 8 21:36:20 1994
--- simple.c Fri Oct 21 16:28:05 1994
***************
*** 523,529 ****
p_clreof(pf); /* clear EOF indicator */
echo = TRUE;
if (nodsc) {
! fprintf(outfile, "%%! PostScript Document, but non-conformant\n");
fprintf(outfile, "%% so psrv is not invoked\n");
}
--- 523,529 ----
p_clreof(pf); /* clear EOF indicator */
echo = TRUE;
if (nodsc) {
! fprintf(outfile, "%%!\n%% PostScript Document, but non-conformant\n");
fprintf(outfile, "%% so psrv is not invoked\n");
}
Received on Wed Jan 11 1995 - 23:51:21 NZDT