pthread_kill trouble
From: Capstar (news_at_deleg.homeip.net)
Date: 10/20/04
- Next message: Colossus: "Re: Weird crash in in _nv000029gl () from /usr/lib/libGL.so.1"
- Previous message: Andrei Voropaev: "Re: program memory usage"
- Next in thread: Sebastien Decugis: "Re: pthread_kill trouble"
- Reply: Sebastien Decugis: "Re: pthread_kill trouble"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 20 Oct 2004 10:23:15 +0200
Hi NG,
I've been working on a library, which internally uses pthreads. At some
point I want to kill/abort a child thread. So I call pthread_kill on
that specific thread, with SIGINT or SIGKILL (tried both). But it seems
my whole application seems to be killed that way.
Is this supposed to happen?
I've solved this by using pthread_cancel, but I believe this will only
cancel my thread once I reach a cancelation point, which is not what I
realy want.
I have tried pthread_setcanceltype with PTHREAD_CANCEL_ASYNCHRONOUS, but
that didn't seem to make any difference.
Is there any other way I can kill a pthread without killing the whole
app or any other threads?
Is there also a way to suspend a pthread? I read somewhere that it is
possible, but the example code was full of signal handlers and stuff. I
couldn't realy follow that to be honest. (Can't find the link anymore).
Thanks,
Mark
-- <<Remove the del for email>>
- Next message: Colossus: "Re: Weird crash in in _nv000029gl () from /usr/lib/libGL.so.1"
- Previous message: Andrei Voropaev: "Re: program memory usage"
- Next in thread: Sebastien Decugis: "Re: pthread_kill trouble"
- Reply: Sebastien Decugis: "Re: pthread_kill trouble"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]