Next | Trivial Utilities | 100 |
And what if the queue isn't empty?
my $head = shift @QUEUE; unless (unlink $CONF{curfile}) { if ($! !~ /no such file/i) { die "Couldn't unlink $CONF{curfile}: $!; aborting"; } }
curfile is a symlink that points to the file currently being printed
It is there is so that printq can report which file is currently being printed
But also so that the actual printing program does not have to worry about funny filenames
symlink $head, $CONF{curfile} or temp_error("Couldn't symlink $head to $CONF{curfile}: $!", 30); print STDERR "current job is now $head\n" if $CONF{debug_printd};
unless (open FILE, $CONF{curfile}) { # system ("ls -l"); die "Couldn't open spool file $head ($CONF{curfile}): $!; aborting"; }
Next | Menu | Copyright © 2012 M. J. Dominus |