This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

poll() with POLLIN not set still getting hit

I'm trying to wait on a single POLLIN event on a net socket, but I'm finding that poll() will still return immediately with the POLLIN event even if it's not set in the struct pollfd.event bitfield. It'll keep doing this, too, until someone uses recv() to read the data. When there's no data -- both before doing something that causes incoming data and after a recv() -- poll() properly sits and waits in the kernel call.

Our code is using the "offloaded" socket setup, so I would think this behavior is a consequence of the nRF9160 co-processor's socket stack. Is this a known issue/intended behavior?

Parents Reply Children
No Data
Related