SLCancelJob(3)
SLCancelJob - cancels a queued printer job
As shipped in IRIX 6.5.15. Unchanged since IRIX 6.5.
NAME SLCancelJob - cancels a queued printer job SYNOPSIS #include <spool.h> int SLCancelJob(const char *job_id, unsigned int spooler, const char *printer); DESCRIPTION SLCancelJob cancels the printer job currently queued for printing. Any job on the queue which is owned by the user may be canceled regardless of whether that job was submitted using libspool functions or spooling system commands. job_id Specifies the ID of the job to be canceled. This ID is available in the SLPrintJob structure job_id field if the job was submitted to a System V spooling system using libspool. The job ID can also be obtained by examining the queue for the desired printer. Unfortunately the BSD spooling system does not provide a job ID when a print job is submitted. To obtain a job ID under the BSD spooling system the print queue must be examined. spooler This parameter specifies the spooling system to use when cancelling the job. The possible spoolers that may be specified are System V (SL_SPOOLER_SYSV ) or BSD (SL_SPOOLER_BSD). If the default spooling system is to be used, this parameter should be specified as SL_SPOOLER_NONE. The spooler parameter is provided so that the cancelling of jobs on different spooling systems does not require setting a new default spooling system before each call to SLCancelJob. Note that specifying a spooling system to SLCancelJob does not affect the setting of the default spooling system. printer Specifies the printer on whose queue the job resides. If this parameter is NULL, the default printer is assumed. RETURN VALUE 0 is returned if execution was successful. -1 is returned and SLerrno is set if an execution error has occurred. EXECUTION ERROR CODES SLCancelJob will fail under the following circumstances. SL_ERR_FIND_SPOOLER An error occurred while attempting to determine the available printer spooling systems. SL_ERR_NO_SPOOLERS There are no printer spooling systems available. SL_ERR_SPOOLER_UNKNOWN The spooling system specified is not available. SL_ERR_SPOOLER_ERROR A printer spooling system error has occurred. SL_ERR_NO_JOBID The print job ID specified is either a NULL pointer, an empty string ("") or a string consisting entirely of whitespace. When canceling a print job under the BSD spooling system, SLCancelJob will also fail under the following circumstances. SL_ERR_BAD_PRINTER_NAME The printer name specified is either an empty string (""), or a string consisting entirely of whitespace. NOTES 1. No confirmation that the job was found and canceled is provided. 2. Under System V spooling the printer parameter is ignored and can be set to NULL. This is because the printer for the job is determined from the job ID. SEE ALSO SLSubmitJob(3), SLGetQueue(3), SLPerror(3), libspool(3), cancel(1)