Interrupt poll(...)

NevynSelby
Posts: 33
Joined: Thu Dec 24, 2015 12:04 pm

Interrupt poll(...)

Postby NevynSelby » Thu Jul 16, 2020 4:20 pm

The Problem:

I have a system with multiple tasks and one of the tasks performs a poll on a socket. One of the other tasks needs to be able to stop the poll operation.

What I've tried

What I would normally consider is to create an unnamed pipe and add an additional file descriptor to the poll call and set the new descriptor to that or the input stream of the pipe. When I wanted to kill the poll process I would just write to the stream which would cause poll to terminate.

I have coded up my solution and got everything compiling but the link is failing with an undefined symbol pipe.

Is pipe supported ? If it is then what magic do I need to weave to get the method linked into my code?

Alternatives

I'm not tied to this as a solution, all I really need to do is kill the poll operation. I'm happy to kill the task making the poll call so long as I am not going to be leaving resources used when the task is deleted.

Any thoughts on how I can resolve this?

Thanks in advance,
Mark

jbreva
Posts: 4
Joined: Thu Jan 02, 2020 12:53 pm

Re: Interrupt poll(...)

Postby jbreva » Mon Dec 14, 2020 9:34 am

Hi!
I'm having the same problem, so let's bump the post and see if anyone can give us some insight

Who is online

Users browsing this forum: No registered users and 70 guests