From 4a3dc85f695e6448e6279dc48894b500168f42f9 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 24 Sep 2024 15:28:16 +0200 Subject: estream: Let poll return an error for a closed fd. * src/estream.c (_gpgrt_poll): Set got_nval. --- src/estream.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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; -- cgit v1.2.3