You have to install a signal handler for SIGINT. The default action is to
terminate the program when SIGINT arrives (see signal(7)). To change
this, add signal (SIGINT, sigfunc) to your main() function, and then add this 
code:

volatile int sig_caught = 0;

void
sigfunc (int signo)
{
  sig_caught = 1;
}

Brian


On Thu, Nov 07, 2002 at 04:52:04PM +0100, jlebra wrote:
> Hello,
> 
> I have one problem with the pthread_kill() function.
> 
> When I call it my program crash!
> 
> I use this function like this :
> 
> ---------
> static int    num_thread;
> pthread_t     new_thread;
> 
> 
> int main(int argc, char* argv[])
> {
> ...
> 
>     // Just for a test
>     num_thread; = pthread_create(&new_thread, NULL,
> TestTpsReaction, NULL);
>     pthread_kill(new_thread, SIGINT);
> 
>     gdk_threads_enter();
>     gtk_main();
>     gdk_threads_leave();
>     return 0;
> }
> 
> -------
> 
> Why my application crash???
> Have you an idea?
> 
> Thanks.
> 
> 
> 
> =====
> oO0 A + Ju 0Oo
> 
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran?ais !
> Yahoo! Mail : http://fr.mail.yahoo.com
> _______________________________________________
> gtk-list mailing list
> [EMAIL PROTECTED]
> http://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to