MT#55283 set POLLHUP on EOF

This seems to be required by the poll interface

Change-Id: Ie47a365f3e0bf9d6b1cdfbe9fadb6702b01ed476
pull/1802/head
Richard Fuchs 2 years ago
parent 074acd0f0a
commit 0de6da471c

@ -3443,8 +3443,10 @@ static unsigned int proc_stream_poll(struct file *f, struct poll_table_struct *p
DBG("locking stream's packet list lock\n");
spin_lock_irqsave(&stream->packet_list_lock, flags);
if (!list_empty(&stream->packet_list) || stream->eof)
if (!list_empty(&stream->packet_list))
ret |= POLLIN | POLLRDNORM;
if (stream->eof)
ret |= POLLIN | POLLRDNORM | POLLHUP | POLLRDHUP;
DBG("returning from proc_stream_poll()\n");

Loading…
Cancel
Save