ioslave terminating mechanism

Waldo Bastian bastian at kde.org
Fri Apr 19 01:45:33 BST 2002


On Thursday 18 April 2002 02:58 pm, aleXXX wrote:
> On Thursday 18 April 2002 23:10, Waldo Bastian wrote:
> > On Thursday 18 April 2002 01:44 pm, aleXXX wrote:
> > > Exactly my thoughts :-)
> > > But, after thinking a bit more about it, e.g. if the ioslave is in a
> > > lengthy get(), we won't get back to dispatchLoop() soon, so in these
> > > cases the SIGALARM would hit
> >
> > It should do some checking in its get() method then. If it fails to do so
> > it will be killed by SIGALARM.
>
> What should it check for, the "global" flag ?
>
> Something like
>
> MySlave::get() {
> ...
> while (somethingToSendLeft) {
>    if (wasKilled())
>       return;
>    read(buf,x);
>    data(buf);
>    ...
> };
>

Yes.

Cheers,
Waldo
-- 
bastian at kde.org  |   SuSE Labs KDE Developer  |  bastian at suse.com





More information about the kde-core-devel mailing list