select() does NOT return

Hello,

I use select() to wait for input from a resource manager. When no input data is available, select() blocks (SIGWAITINFO). When then the resource manager terminates (intentional or crashed) then select() does NOT come back with an EBADF - it stays blocked forever! What can I do?

Thanks,

Albrecht.

Use a timeout or have the resource manager perform the cleanup.

Timeout is polling, which is not the way QNX works. Resource manager side cleanup is a better idea but it doesn’t work in some cases, e.g. when resource manager dies from a SIGKILL or second SIGSEGV.

My question is: Is that behaviour of select() intentional? Or is it simply a bug in the QNX?

Well, in the end we probably go for timeout …

Regards,
Albrecht

Not really since while waiting for the timeout no CPU power is used.