Re: Can EINTR be handled the way BSD handles it? -- a plea from a user-land programmer...

From: dean gaudet (dean-list-linux-kernel@arctic.org)
Date: Mon Nov 06 2000 - 23:46:38 EST


On Mon, 6 Nov 2000, George Talbot wrote:

> I respectfully disagree that programs which don't surround some of the
> most common system calls with
>
> do
> {
> rv = __some_system_call__(...);
> } while (rv == -1 && errno == EINTR);

welcome to Unix. this is how it is, and it's not just linux. and it's
not just glibc/linuxthreads. in your code do you go about setting all
signals to SA_RESTART? if not then you're subject to the vagaries of
whatever the default signal settings are.

ted mentioned ^Z... there's also strace/truss/ktrace (depending on your
flavour of unix). there's also page-out/in (and on some unixes there's
swap-out/in).

it's something which bites lots of folks. gnu tar had this bug for at
least 5 years, and may still have it -- i got tired of submitting the bug
fix.

-dean

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



This archive was generated by hypermail 2b29 : Tue Nov 07 2000 - 21:00:21 EST