[cups.development] [RFE] STR #2103: signal handling in backendRunLoop()

twaugh.redhat twaugh at redhat.com
Tue Nov 14 11:16:58 PST 2006


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

It would be nice if backendRunLoop() could handle the case where a job has
been cancelled before any data has been written to the device, for
instance if the device has been switched off the whole time.

It means installing a SIGTERM handler to set a module-global flag;
checking this flag before calling write() and exiting if totalbytes == 0;
and preventing the race window where the signal arrives after the check
but before the write() syscall -- perhaps by closing the fd in the signal
handler to make the write() fail?

Link: http://www.cups.org/str.php?L2103
Version:  -feature





More information about the cups-devel mailing list