aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2024-09-24 13:28:16 +0000
committerWerner Koch <[email protected]>2024-09-24 13:28:16 +0000
commit4a3dc85f695e6448e6279dc48894b500168f42f9 (patch)
tree822da9a0d0560c0712a92f1abc6ce702769ef1a0 /src
parentposix: Fix forgotten _gpgrt_post_syscall on error path. (diff)
downloadlibgpg-error-4a3dc85f695e6448e6279dc48894b500168f42f9.tar.gz
libgpg-error-4a3dc85f695e6448e6279dc48894b500168f42f9.zip
estream: Let poll return an error for a closed fd.
* src/estream.c (_gpgrt_poll): Set got_nval.
Diffstat (limited to 'src')
-rw-r--r--src/estream.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/estream.c b/src/estream.c
index 66ebc4b..035d30d 100644
--- a/src/estream.c
+++ b/src/estream.c
@@ -5533,6 +5533,11 @@ _gpgrt_poll (gpgrt_poll_t *fds, unsigned int nfds, int timeout)
item->got_hup = 1;
any = 1;
}
+ if ((poll_fds[poll_nfds].revents & POLLNVAL))
+ {
+ item->got_nval = 1;
+ any = 1;
+ }
if (item->want_read && (poll_fds[poll_nfds].revents & (POLLIN|POLLHUP)))
{
item->got_read = 1;