Re: Incorect signal handling ?

From: Doug McNaught (doug@wireboard.com)
Date: Thu Apr 12 2001 - 16:56:37 EST


Daniel Podlejski <underley@underley.eu.org> writes:

> Hi,
>
> there is litlle programm:
>
> signal (SIGALRM, empty);
> alarm (1);
>
> a = read(fd, buf, 511);
>
> while (a && a != -1) a = read(fd, buf, 511);

> I open /tmp/nic and run compiled program.
> There should be error EINTR in read, but isn't.

"Fast" system calls (eg reads from disk) are generally
uninterruptible; thus the signal will be deferred until the read()
returns.

-Doug
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 15 2001 - 21:00:20 EST