select ()

Hi, can anyone tell me for what reason select () returns -1 with errno = 3
(ESRCH - no such process) ? It was running OK for a while and suddenly it
returns this error. errno 3 is not one of the documented error in the select
function.

Johannes <Jsukamtoh@infolink.co.id> wrote:

Hi, can anyone tell me for what reason select () returns -1 with errno = 3
(ESRCH - no such process) ? It was running OK for a while and suddenly it
returns this error. errno 3 is not one of the documented error in the select
function.

Were you selecting on a server/resource manager that exited/died while
you were trying to select() on a fd to it?

ESRCH is generally caused by being SEND/REPLY blocked on a process, and
that process either exiting, crashing, or destroying its channel while
you were in that state.

Also, in general for many QNX operations, it is worth checking the
errno listing for MsgSend() on top of any specific function, as much
of the POSIX/standard/Unix stuff is implemented on top of MsgSend().

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.