diff options
| author | Albert Cahalan <albert.cahalan@ccur.com> | 2003-09-21 23:23:42 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-09-21 23:23:42 -0700 |
| commit | 8912ad073fd7d7110a57acbfa0b33d4dad9d1ee1 (patch) | |
| tree | b0fb3e8608cc3658356a29c98367c08d41a5fea0 /kernel | |
| parent | 36fe88586f62a987ae416c0040196d9f301d97fb (diff) | |
[PATCH] shared signals require shared VM
Elimination of this nonsense allows for the assumption
that a task group shares VM. This lets procps run faster.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/fork.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index f2d3115483da..2005c5c180de 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -775,6 +775,14 @@ struct task_struct *copy_process(unsigned long clone_flags, return ERR_PTR(-EINVAL); /* + * Shared signal handlers imply shared VM. By way of the above, + * thread groups also imply shared VM. Blocking this case allows + * for various simplifications in other code. + */ + if ((clone_flags & CLONE_SIGHAND) && !(clone_flags & CLONE_VM)) + return ERR_PTR(-EINVAL); + + /* * CLONE_DETACHED must match CLONE_THREAD: it's a historical * thing. */ |
