[cups.bugs] [HIGH] STR #3649: Serial back end has inverted SIGTERM block
Bryan Mason
bmason at redhat.com
Fri Aug 20 16:27:18 PDT 2010
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
According to the comments in serial.c:
/*
* Now that we are "connected" to the port, ignore SIGTERM so that we
* can finish out any page data the driver sends (e.g. to eject the
* current page... Only ignore SIGTERM if we are printing data from
* stdin (otherwise you can't cancel raw jobs...)
*/
However, the code after that comment is:
if (print_fd != 0)
{
#ifdef HAVE_SIGSET /* Use System V signals over POSIX to avoid bugs */
sigset(SIGTERM, SIG_IGN);
#elif defined(HAVE_SIGACTION)
memset(&action, 0, sizeof(action));
sigemptyset(&action.sa_mask);
action.sa_handler = SIG_IGN;
sigaction(SIGTERM, &action, NULL);
#else
signal(SIGTERM, SIG_IGN);
#endif /* HAVE_SIGSET */
}
which would seem to operate the opposite of the comments. The result is
that you can't stop raw print jobs sent to serial printers.
Link: http://www.cups.org/str.php?L3649
Version: 1.4-current
More information about the cups-devel
mailing list