🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #809

Re: Removing ehandler.ps Without Turning Off Power

#809
From: Glenn Reid
Date: Sat, 05 Aug 1989 00:38
50 lines
2448 bytes
In article <24271@iuvax.cs.indiana.edu> hess@iuvax.cs.indiana.edu (Caleb Hess) writes:
>In article <1992@optilink.UUCP> cramer@optilink.UUCP (Clayton Cramer) writes:
>Here is a way to completely reset your printer without power cycling.  We
>run this periodically to ensure that the printer's VM is not accumulating
>garbage (since PostScript doesn't do garbage collection).
>
>%!
>%  Executes the systemdict/quit operator (as opposed to the userdict/quit
>%  operator, which is synonymous with stop or EOF) to reinitialize PostScript
>%       (suggested by Guy Riddle in comp.lang.postscript, 8/4/88)       - hess
>
>serverdict begin
>0
>exitserver
>systemdict begin
>quit


This is unnecessary.  The save/restore mechanism is more foolproof
than any garbage collection algorithm.  We leave our printers going
for months at a time without power cycling or rebooting them, and
they don't "lose" even a single byte of VM.  The only way you will
lose VM is if somebody exits the server loop and defines something,
in which case the code you suggest is a reasonable way to get rid
of it.

I would at least suggest a modification to this program so that it
doesn't unnecessarily reboot the printer every however-often.  Use
"vmstatus" to determine how much free VM is left, and if it is less
than a prescribed amount, then reboot:

%!
vmstatus exch sub
100000		% your limit here
lt {
    serverdict begin 0 exitserver
    systemdict /quit get exec
}{ pop } ifelse

I haven't tested this, but it should work, I think.

As far as getting rid of just the error handler, you could, with
a little work, rewrite it so that you can download the code once,
then download another little patch to change the name "handleerror"
to point to the old code or the new code, whichever you want.  That
way the code would stay in the printer, but you could de-activate
it without rebooting the printer.

Glenn Reid
Adobe Systems
Technical Details
Message-ID: <1052@adobe.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!decwrl!adobe!greid
References: <1992@optilink.UUCP> <24271@iuvax.cs.indiana.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!decwrl!adobe!greid
From: greid@adobe.com (Glenn Reid)
Newsgroups: comp.lang.postscript
Subject: Re: Removing ehandler.ps Without Turning Off Power
Message-ID: <1052@adobe.UUCP>
Date: 5 Aug 89 00:38:47 GMT
References: <1992@optilink.UUCP> <24271@iuvax.cs.indiana.edu>
Sender: news@adobe.COM
Reply-To: greid@adobe.COM (Glenn Reid)
Distribution: na
Organization: Adobe Systems Incorporated, Mountain View
Lines: 50