kaio
[Top] [All Lists]

Re: How to block signal on main process(kaiod are defunct. why???)

To: ±èÈñ¼º <hskim@xxxxxxxxxxxxx>
Subject: Re: How to block signal on main process(kaiod are defunct. why???)
From: Henrik Nordstrom <hno@xxxxxxxxxxxxxxx>
Date: Tue, 17 Oct 2000 16:36:37 +0200
Cc: kaio@xxxxxxxxxxx
References: <002701c033d2$e48e65a0$c73728d3@xxxxxxxxxxxxxxxxxx>
Sender: owner-kaio@xxxxxxxxxxx
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.
> 
>


<Prev in Thread] Current Thread [Next in Thread>