Re: [LIP] NPTL behaviour differences
Arun Sharma <[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Mar 04, 2004 at 12:57:01PM +0530, Shridhar Daithankar wrote: > >- Signal handling (you can send signals to a whole process now) > > I believe signals can be per thread now. Earlier it was to the entire > process. > No, it's the other way around. You could always send a signal to a thread in linuxthreads using kill(pid, SIG) where pid was the id of the thread, modelled as a Linux task. The idea of a "process", a container for threads didn't quite exist. getpid() returned the thread id, not a process-wide id. So there was nothing to send a signal to. With NPTL, you have two calls - getpid() and gettid(). If you send a signal to a process, any eligible thread within the process can handle it. Some special signals, such as SIGSTOP are handled by all threads within a process, so that you can cleanly Ctrl+Z a multithreaded process. -Arun ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click