do_poll: return -EINTR when signalled
commit9bf084f70ffde6521d113593b89461a5bd2a303b
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 17 Oct 2007 06:26:18 +0000 (16 23:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:48 +0000 (17 08:42 -0700)
treeea62a8c9c54d0f702e73e9fa6e6c8699106ab892
parent252e5725cfb55a89e54888317856903fef9d5031
do_poll: return -EINTR when signalled

do_poll() checks signal_pending() but returns 0 when interrupted.  This means
the caller has to check signal_pending() again.

Change it to return -EINTR when signal_pending() and count == 0.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andi Kleen <ak@suse.de>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Vadim Lobanov <vlobanov@speakeasy.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/select.c