2000-10-28 18:44:28

by David T Eger

[permalink] [raw]
Subject: signal handlers not linked properly in do_fork()?


I've been looking at the code for do_fork() / copy_sighand() and am
mystified by the following. It seems that copy_sighand() only sets the
new task's sig member if it is not CLONEd from the parent.

If the signal_struct is CLONEd from the parent, it increments the parent's
signal_struct's reference count, but does not set the new task's sig
member. I see nowhere else in do_fork() where sig is set, either.
What gives?

-David Eger


2000-10-28 19:04:27

by David Miller

[permalink] [raw]
Subject: Re: signal handlers not linked properly in do_fork()?

Date: Sat, 28 Oct 2000 14:44:03 -0400 (EDT)
From: David Eger <[email protected]>

I see nowhere else in do_fork() where sig is set, either. What
gives?

fork.c, around line 560:
*p = *current

Later,
David S. Miller
[email protected]