Have seen a similar problem while working on a derivate of KAIO.
The patch is to block all signals in the KAIO library when starting
helper threads. KAIO is not prepared to handle signal delivery to the
I/O kernel threads.
int
child(void *arg)
{
/* child */
fprintf (stderr, "entering child %d...\n", getpid());
---> sigblock(-1); /* block all signals */
aio(AIOCMD_SLAVE, 0, 0, 0, 0);
fprintf (stderr, "child %d exiting: %d\n", getpid(), errno);
exit(-1);
}
--
Henrik Nordstrom
±èÈñ¼º wrote:
>
> Hello,
>
> I'm coding socket server program using aio*.
> Here is my problem.
>
> I'm blocking aio_completion signal using pthread_sigmask() except one
> pthread.
> but it seems unblocked on main process(listening process) and ps show
> me
> all kaiod-workers and one worker thread(process?) to be defunct.
> aio_read/aio_write call return out of resource error.
>
> can anybody help me?
>
> thx,
>
>
> Regards,
>
> Hee S. Kim
> hskim@xxxxxxxxxxxxx
>
> ps.) show me the examples of multithreaded socket coding using
> aio_*,if one have.
>
>
|