Skip to content

Commit

Permalink
MT#55283 set POLLHUP on EOF
Browse files Browse the repository at this point in the history
This seems to be required by the poll interface

Change-Id: Ie47a365f3e0bf9d6b1cdfbe9fadb6702b01ed476
  • Loading branch information
rfuchs committed Feb 22, 2024
1 parent 074acd0 commit 0de6da4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel-module/xt_RTPENGINE.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit 0de6da4

Please sign in to comment.