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)
typedef void (*signalHandler_t)(int);
static signalHandler_t sig;
static void _sigAlarm(int code);
static void _sigAlarm(int code)
int main(int argc, char **argv)
char *dev = "/dev/lp0";
if (argc > 1 )
dev = argv;
fd = open(dev, O_RDWR);
if (fd > -1 )
sig = signal(SIGALRM, _sigAlarm);
rd = read(fd, buf,511);
printf("read -> %d\n",rd);
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. compile provided example
2. run example
Actual Results: see above
Expected Results: the read call shall return after the signal was processed.
All was OK on tzhe 2.4 kernels, the acual behaviour is very bad and all printer
port (USB //) have different (buggy) working mode.
*** This bug has been marked as a duplicate of 163486 ***