In which thread the signal_handler is running?

From: Morgan Cheng (morgan.chengmo_at_gmail.com)
Date: 12/24/04


Date: Fri, 24 Dec 2004 15:45:25 +0800

In <Advanced Linux Programming>, it is said "Signals are asynchronous;
when a process receives a signal, it processes the signal immediately,
without finishing the current function or even the current line of code."

So, which thread runs the signal handler function? a new thread?

By the way, for multithread process, only one stack or the number of
stack is the same as the number of thread?



Relevant Pages

  • Re: [RFC PATCH -tip 0/4] x86: signal handler improvement
    ... I noticed there are inefficient codes in x86 signals. ... and errors in __put_user is stored to stack. ... I prefer to finish unification first. ...
    (Linux-Kernel)
  • [RFC PATCH -tip 0/4] x86: signal handler improvement
    ... I noticed there are inefficient codes in x86 signals. ... and errors in __put_user is stored to stack. ... This patch series also reduces stack usages and code size. ...
    (Linux-Kernel)
  • Re: [RFC PATCH -tip 0/4] x86: signal handler improvement
    ... I noticed there are inefficient codes in x86 signals. ... and errors in __put_user is stored to stack. ... call I/O stat clos TCP inst hndl proc proc proc ...
    (Linux-Kernel)
  • Re: how do threads work?
    ... >> current stack, and store the stack pointer into the current thread ... Context switch done. ... >> only asynchronous events a process can receive are signals, ... You can fetch the stack pointer of the interupted thread in the ...
    (comp.os.linux.development.system)
  • Re: sigaltstack with threads
    ... >> valgrind deals with signals, ... >> When a signal stack is installed in FreeBSD, ... This syscall thread runs with something like the debugged ...
    (freebsd-arch)