Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
a866697c
Commit
a866697c
authored
Feb 06, 2003
by
Daniel Jacobowitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signal handling bugs for thread exit + ptrace
parent
45c1a159
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
kernel/exit.c
kernel/exit.c
+12
-4
No files found.
kernel/exit.c
View file @
a866697c
...
@@ -586,7 +586,7 @@ static void exit_notify(void)
...
@@ -586,7 +586,7 @@ static void exit_notify(void)
* is about to become orphaned.
* is about to become orphaned.
*/
*/
t
=
current
->
parent
;
t
=
current
->
real_
parent
;
if
((
t
->
pgrp
!=
current
->
pgrp
)
&&
if
((
t
->
pgrp
!=
current
->
pgrp
)
&&
(
t
->
session
==
current
->
session
)
&&
(
t
->
session
==
current
->
session
)
&&
...
@@ -619,8 +619,16 @@ static void exit_notify(void)
...
@@ -619,8 +619,16 @@ static void exit_notify(void)
current
->
exit_signal
=
SIGCHLD
;
current
->
exit_signal
=
SIGCHLD
;
if
(
current
->
exit_signal
!=
-
1
)
/* If something other than our normal parent is ptracing us, then
do_notify_parent
(
current
,
current
->
exit_signal
);
* send it a SIGCHLD instead of honoring exit_signal. exit_signal
* only has special meaning to our real parent.
*/
if
(
current
->
exit_signal
!=
-
1
)
{
if
(
current
->
parent
==
current
->
real_parent
)
do_notify_parent
(
current
,
current
->
exit_signal
);
else
do_notify_parent
(
current
,
SIGCHLD
);
}
current
->
state
=
TASK_ZOMBIE
;
current
->
state
=
TASK_ZOMBIE
;
/*
/*
...
@@ -877,7 +885,7 @@ asmlinkage long sys_wait4(pid_t pid,unsigned int * stat_addr, int options, struc
...
@@ -877,7 +885,7 @@ asmlinkage long sys_wait4(pid_t pid,unsigned int * stat_addr, int options, struc
if
(
p
->
real_parent
!=
p
->
parent
)
{
if
(
p
->
real_parent
!=
p
->
parent
)
{
write_lock_irq
(
&
tasklist_lock
);
write_lock_irq
(
&
tasklist_lock
);
__ptrace_unlink
(
p
);
__ptrace_unlink
(
p
);
do_notify_parent
(
p
,
SIGCHLD
);
do_notify_parent
(
p
,
p
->
exit_signal
);
p
->
state
=
TASK_ZOMBIE
;
p
->
state
=
TASK_ZOMBIE
;
write_unlock_irq
(
&
tasklist_lock
);
write_unlock_irq
(
&
tasklist_lock
);
}
else
}
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment