Re: Signals and threads



Hello,

In the pthread_library clone call is used , In the man page of clone
its given that
if CLONE_SIGHAND is not defined, the signal handlers will not be shared

between threads.
I recompiled the pthread library with out CLONE_SIGHAND .

yes... clone() allows you to fine tune what's shared between kernel
schedulable entity... But doing so, you don't get a "Pthread library"
anymore.

I linked the program with the new library , It has been ok in the
do_fork call in the pthread funciton, A new struct of task_struct->sig
is allocated. Also i have seen that the sigaction function call in the
thread modifies and install a new handler in this already allocated
task_struct->sig structure.
Inspite of all this the last sig handler function is getting called
when i send the signal to the first thread. Any clue???

As mentionned by Nils, it is not a good idea at all to change the
Pthreads library behavior. If other programs use it, they will
certainly break in strange way...

Again, the questions you should answer is why do you need that
functionality in first place... And if you do, then create your
seperate "thread" library...

Finally, how do you send the SIGUSR1 to your threadA?

Cheers,
Loic.

.



Relevant Pages

  • Re: Zombie Trouble Shooting
    ... my $handler = sub { ... # do something with $pid ... The reason is that old SysV machines are broken wrt signal handlers ...
    (perl.beginners)
  • Re: Signals and threads
    ... In the pthread_library clone call is used, In the man page of clone ... the signal handlers will not be shared ... Inspite of all this the last sig handler function is getting called ...
    (comp.os.linux.development.apps)
  • Re: Signals and threads
    ... In the pthread_library clone call is used, In the man page of clone ... the signal handlers will not be shared ... Inspite of all this the last sig handler function is getting called ...
    (comp.os.linux.development.apps)
  • Re: Failed To Install Any Update From Web Only
    ... This error message may occur if you have insufficient permissions to the Windows Update registry keys. ... If I download the updates and install manually, ... Got error "80070005:wuauclt handler: failed to spawn COM server" from update log. ...
    (microsoft.public.windowsupdate)
  • Re: Very Odd Behavior - Using a form on Outlook 2003 AddIn
    ... I am using the setup project that VS 2005 builds for me to install the ... let them live for as long as Outlook is running? ... The goal of the addin is to provide the user that sends an email the ... and in the addin event handler code i put the following code: ...
    (microsoft.public.office.developer.com.add_ins)