Re: [PATCH 1/3] copyfile: generic_sendpage

From: Gunnar Ritter
Date: Tue Sep 07 2004 - 06:53:31 EST


JÃrn Engel <joern@xxxxxxxxxxxxxxxxxxxx> wrote:

> Tested, sendfile(2) returns a short count if you send a signal to the
> calling process.

Fine, thank you. This makes it really useful.

> Add another loop in the userspace caller to deal with it, if you don't
> already have it. It's a valid and documented return value, after all.

Of course (although cp will be terminated by the SIGINT anyway, so it
does not matter in this situation).

Do I understand this correctly that sendfile now behaves like write with
SA_RESTART not set for the signal? If so, it might perhaps make sense to
add SA_RESTART semantics too, so that sendfile then just continues if the
process catches the signal and does not abort (scenario: SIGWINCH is sent
to a curses-based file manager).

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