(v13) Shutting down the Harlequin RIP
This page applies to Harlequin v13.1r0 and later; and to Harlequin Core but not Harlequin MultiRIP.
The RIP is designed to operate continuously, receiving jobs and processing them indefinitely. In an environment where this is not appropriate, the %config%
device must be used to terminate the RIP.
There is a name, quit
, which can help: it exists in two varieties, one a procedure in userdict
and the other an operator in systemdict
.
The userdict
version essentially executes a stop
guaranteed to reach the stopped context of the server loop, and not be treated as an error. It is therefore a method of terminating a job within the server loop. This means then that the %config%
device is consulted again, and one of the device functions can then terminate in whatever way it wishes.
The systemdict
version (like the Adobe equivalent) does not actually terminate the RIP, but reboots it. This causes large sections (but not all) of the bootstrap sequence listed in (v13) Starting up the Harlequin RIP to be re-run. Core-RIP developers also sees the C function SwReboot
called at this time. (Command-line versions implement this by actually quitting the RIP.)
In GUI versions, the Harlequin RIP > Quit
menu item is rather more fierce than this, since it must be possible to quit the RIP while a job is in progress if necessary.
There are a number of ways to stop a job from PostScript-language code. This short job is one way to abort the current job and then stop the RIP:
$printerdict /superstop dup put systemdict begin quit
If you submit this job in a spool folder, the RIP quits before it is able to remove the file from the folder. The consequence is that you must remove the file, either manually before restarting the RIP or by writing start-up code to remove the file before the spool folder input is enabled. This problem does not occur with other types of input, but superstop
may be unreliable when used from an asynchronous plugin.
This short job is the preferred way to abort a job from PostScript-language code:
statusdict /setinterrupt get exec systemdict begin quit
If you configure the socket plugin channel with a Quit
channel type then connect to that port with any sending application, the RIP sends itself an MW_QUIT
message and then conveniently die. (It is only necessary to connect to the socket, not to send any data.)