Bug 163486 - lp0 read not interruptible by SIGALARM
lp0 read not interruptible by SIGALARM
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Brian Brock
:
: 163487 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-18 05:57 EDT by Jean-Jacques Sarton
Modified: 2015-01-04 17:21 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-12 09:43:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jean-Jacques Sarton 2005-07-18 05:57:58 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.7.8-1.3.1

Description of problem:
The read call on /dev/lp0 is not interrupted by SGIALARM.

The following progam can only be terminated by ^C or kill.
The read call shall be interrupted (an alarm generated via alarm(1)), the
signal is processed but the read call do not return (this was OK on 2.4 kernels)
 
#include <stdio.h>
#include <signal.h>
#include <fcntl.h>

typedef void (*signalHandler_t)(int);
static signalHandler_t sig;
static void _sigAlarm(int code);

static void _sigAlarm(int code)
{
   printf("_sigAlarm got\n");
}

int main(int argc, char **argv)
{
   char *dev = "/dev/lp0";
   char buf[511];
   int  fd;
   int  rd;
   if (argc > 1 )
      dev = argv[1];
   
   fd = open(dev, O_RDWR);
   if (fd > -1 )
   {
      sig = signal(SIGALRM, _sigAlarm);
      alarm(1);
      rd = read(fd, buf,511);
      printf("read -> %d\n",rd);
   }
   return 0;
}


Version-Release number of selected component (if applicable):
kernel-2.6.11-1.35_FC3

How reproducible:
Always

Steps to Reproduce:
1. compile provided example
2. run example
3. 
  

Actual Results:  see above

Expected Results:  the read call shall return after the signal was processed.


Additional info:

All was OK on tzhe 2.4 kernels, the acual behaviour is very bad and all printer
port (USB //) have different (buggy) working mode.
Comment 1 Pete Zaitcev 2005-07-18 12:12:53 EDT
*** Bug 163487 has been marked as a duplicate of this bug. ***
Comment 2 Dave Jones 2005-08-26 01:48:27 EDT
Please retry with the latest errata kernel.
Comment 3 Jean-Jacques Sarton 2005-09-01 15:31:45 EDT
No change with the latest kernel (2.6.12-1.1447_FC4).
The same apply for the vanilla 2.6.13 kernel.
Comment 4 Dave Jones 2005-12-07 02:49:10 EST
I suggest bringing this up to a wider audience upstream on the linux kernel list.
(linux-kernel@vger.kernel.org)
Comment 5 Dave Jones 2006-01-16 17:16:01 EST
This is a mass-update to all currently open Fedora Core 3 kernel bugs.

Fedora Core 3 support has transitioned to the Fedora Legacy project.
Due to the limited resources of this project, typically only
updates for new security issues are released.

As this bug isn't security related, it has been migrated to a
Fedora Core 4 bug.  Please upgrade to this newer release, and
test if this bug is still present there.

This bug has been placed in NEEDINFO_REPORTER state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

Thank you.
Comment 6 Dave Jones 2006-02-03 00:56:43 EST
This is a mass-update to all currently open kernel bugs.

A new kernel update has been released (Version: 2.6.15-1.1830_FC4)
based upon a new upstream kernel release.

Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.

This bug has been placed in NEEDINFO_REPORTER state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.

Thank you.
Comment 7 Jean-Jacques Sarton 2006-02-12 09:43:16 EST
The bug is still present with 2.6.15-1.1831_FC4

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