signals: move handle_stop_signal() into send_signal()
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 30 Apr 2008 07:52:50 +0000 (00:52 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:35 +0000 (08:29 -0700)
commit6e65acba7ca8169e38ab55d62d52f29a75fb141f
treea691ee9392b0f2ed8a434e5a5cd6e6a213b70f1b
parentc99fcf28b87d8cab592db7571e3164f5cb54c5b3
signals: move handle_stop_signal() into send_signal()

Move handle_stop_signal() into send_signal().  This factors out a couple of
callsites and allows us to do further unifications.

Also, with this change specific_send_sig_info() does handle_stop_signal().
Not that this is really important, we never send STOP/CONT via send_sig() and
friends, but still this looks more consistent.

The only (afaics) special case is get_signal_to_deliver().  If the traced task
dequeues SIGCONT, it can re-send it to itself after ptrace_stop() if the
signal was blocked by debugger.  In that case handle_stop_signal() is
unnecessary, but hopefully not a problem.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/signal.c