Sorry, wrong question: Signals to threads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: Sorry, wrong question: Signals to threads

Hello,

The observation and hence the question that I asked was wrong in first place.

Anyone who might have read it might have gained a notion that the signal is always delivered to the main thread. I confirmed that when we use the kill command from the shell, it is actually going to the <pid-of-thread> from sys_kill !

I have still not explored who handles that signal @ user space, is it always the main thread -OR- as per standards, a dedicated thread from application should handle the signal.

Thanks,
Peyush


-----Original Message-----
From:   kernelnewbies-bounce@xxxxxxxxxxxx on behalf of Peyush Marwaha
Sent:   Sun 3/13/2005 8:43 PM
To:     kernelnewbies@xxxxxxxxxxxx
Cc:    
Subject:        Signals to threads
Hi,

I am working on RH9 with kernel 2.4.20-31.9smp

I have a process "A" spawning thread "B". (using pthreads)

ps -aefm | grep "A" gives me two pids, one of "A" and one of "B"

When I send a signal to pid-B, it is actually delivered to "A". (I know this because I have my hook in sys_kill)

Is this always the case ? Can I not send a signal directly to a thread (not the main thread) ?

If there is some transformation of converting and sending the signal to thread group leader, who does this transformation ? Kernel ? Libc ? shell ? ....

Please assist.

Thanks,
Peyush




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux