Bug 625955 - Serial back end has inverted SIGTERM block
Summary: Serial back end has inverted SIGTERM block
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cups
Version: 5.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Tim Waugh
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 668957
TreeView+ depends on / blocked
 
Reported: 2010-08-20 23:36 UTC by Bryan Mason
Modified: 2018-11-14 17:28 UTC (History)
5 users (show)

Fixed In Version: cups-1.3.7-28.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-21 03:09:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed patch (447 bytes, patch)
2010-08-20 23:50 UTC, Bryan Mason
no flags Details | Diff
Proposed patch with corrected filename (447 bytes, patch)
2010-08-21 00:02 UTC, Bryan Mason
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
CUPS Bugs and Features 3649 0 None None None Never
Red Hat Product Errata RHSA-2012:0302 0 normal SHIPPED_LIVE Low: cups security and bug fix update 2012-02-21 07:24:35 UTC

Description Bryan Mason 2010-08-20 23:36:21 UTC
Description of problem:

    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 */
      }

Version-Release number of selected component (if applicable):

    cups-1_3_7-18_el5_5_4

How reproducible:

    100%

Steps to Reproduce:

    1. Define a raw print queue with a serial back end.
    2. Submit a print job (lp -d <printer> <file>).
    3. Cancel the print job (cacel <job-id>).
  
Actual results:

    Print job does not cancel

Expected results:

    Print job should cancel.

Additional info:

    See upstream STR #3469.

    Patch is on it's way...

Comment 1 Bryan Mason 2010-08-20 23:50:28 UTC
Created attachment 440069 [details]
Proposed patch

Comment 2 Bryan Mason 2010-08-20 23:58:29 UTC
Oops.  Messed up the STR#.  Sorry.

Comment 3 Bryan Mason 2010-08-21 00:02:00 UTC
Created attachment 440070 [details]
Proposed patch with corrected filename

Comment 6 RHEL Program Management 2011-05-31 14:40:37 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 8 Jiri Popelka 2011-09-14 16:29:53 UTC
I wasn't able to reproduce the problem with cups-1.3.7-26.el5_6.1.
My steps:
# lpadmin -p serialraw -v serial:/dev/ttyS0?baud=115200
# accept serialraw
# lp -d -oraw serialraw cupsd.conf
request id is serialraw-10 (1 file(s))
# lpstat -W not-completed
serialraw-10            root              3072   Wed 14 Sep 2011 06:11:08 PM CEST
# cancel 10
# lpstat -W not-completed
<no job>

Any ideas what have I wrong? This is a virtual machine.

Comment 9 Tim Waugh 2011-09-15 15:08:52 UTC
Do virtual machines have serial ports that always accept data or something like that?

Comment 14 errata-xmlrpc 2012-02-21 03:09:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0302.html


Note You need to log in before you can comment on or make changes to this bug.