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
Kirill Smelkov
linux
Commits
4486825c
Commit
4486825c
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 2.1.48
parent
f454324e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
89 deletions
+21
-89
arch/alpha/kernel/ptrace.c
arch/alpha/kernel/ptrace.c
+1
-1
arch/alpha/kernel/signal.c
arch/alpha/kernel/signal.c
+2
-2
arch/i386/kernel/ptrace.c
arch/i386/kernel/ptrace.c
+1
-1
arch/i386/kernel/signal.c
arch/i386/kernel/signal.c
+2
-2
arch/ppc/ignore
arch/ppc/ignore
+0
-65
include/linux/sched.h
include/linux/sched.h
+1
-1
kernel/exit.c
kernel/exit.c
+14
-17
No files found.
arch/alpha/kernel/ptrace.c
View file @
4486825c
...
...
@@ -650,7 +650,7 @@ asmlinkage void syscall_trace(void)
goto
out
;
current
->
exit_code
=
SIGTRAP
;
current
->
state
=
TASK_STOPPED
;
notify_parent
(
current
);
notify_parent
(
current
,
SIGCHLD
);
schedule
();
/*
* this isn't the same as continuing with a signal, but it will do
...
...
arch/alpha/kernel/signal.c
View file @
4486825c
...
...
@@ -315,7 +315,7 @@ asmlinkage int do_signal(unsigned long oldmask,
if
((
current
->
flags
&
PF_PTRACED
)
&&
signr
!=
SIGKILL
)
{
current
->
exit_code
=
signr
;
current
->
state
=
TASK_STOPPED
;
notify_parent
(
current
);
notify_parent
(
current
,
SIGCHLD
);
schedule
();
single_stepping
|=
ptrace_cancel_bpt
(
current
);
if
(
!
(
signr
=
current
->
exit_code
))
...
...
@@ -354,7 +354,7 @@ asmlinkage int do_signal(unsigned long oldmask,
current
->
exit_code
=
signr
;
if
(
!
(
current
->
p_pptr
->
sig
->
action
[
SIGCHLD
-
1
].
sa_flags
&
SA_NOCLDSTOP
))
notify_parent
(
current
);
notify_parent
(
current
,
SIGCHLD
);
schedule
();
single_stepping
|=
ptrace_cancel_bpt
(
current
);
continue
;
...
...
arch/i386/kernel/ptrace.c
View file @
4486825c
...
...
@@ -577,7 +577,7 @@ asmlinkage void syscall_trace(void)
return
;
current
->
exit_code
=
SIGTRAP
;
current
->
state
=
TASK_STOPPED
;
notify_parent
(
current
);
notify_parent
(
current
,
SIGCHLD
);
schedule
();
/*
* this isn't the same as continuing with a signal, but it will do
...
...
arch/i386/kernel/signal.c
View file @
4486825c
...
...
@@ -346,7 +346,7 @@ asmlinkage int do_signal(unsigned long oldmask, struct pt_regs * regs)
if
((
current
->
flags
&
PF_PTRACED
)
&&
signr
!=
SIGKILL
)
{
current
->
exit_code
=
signr
;
current
->
state
=
TASK_STOPPED
;
notify_parent
(
current
);
notify_parent
(
current
,
SIGCHLD
);
schedule
();
if
(
!
(
signr
=
current
->
exit_code
))
continue
;
...
...
@@ -386,7 +386,7 @@ asmlinkage int do_signal(unsigned long oldmask, struct pt_regs * regs)
current
->
exit_code
=
signr
;
if
(
!
(
current
->
p_pptr
->
sig
->
action
[
SIGCHLD
-
1
].
sa_flags
&
SA_NOCLDSTOP
))
notify_parent
(
current
);
notify_parent
(
current
,
SIGCHLD
);
schedule
();
continue
;
...
...
arch/ppc/ignore
deleted
100644 → 0
View file @
f454324e
.config
compile.h
.version
.objects
.blurb
*.cort
*.paul
*.old
.defines
version.h
find_name
checks
#*
.objects
.object_files
System.map
asm
.menuconfig*
CVS
ppc_defs.h
mk_defs
mkprep
*.s
.depend
.hdepend
*~
*.o
znetboot
zvmlinux
vmlinux
zImage
hack-coff
coffboot
vmlinux.coff
.depend
.cvsignore
RCS
SCCS
CVS.adm
RCSLOG
cvslog.*
tags
TAGS
.make.state
.nse_depinfo
*~
#*
.#*
,*
_$*
*$
*.old
*.bak
*.BAK
*.orig
*.rej
*.a
*.olb
*.o
*.obj
*.so
*.exe
*.Z
*.elc
*.ln
include/linux/sched.h
View file @
4486825c
...
...
@@ -444,7 +444,7 @@ extern void wake_up(struct wait_queue ** p);
extern
void
wake_up_interruptible
(
struct
wait_queue
**
p
);
extern
void
wake_up_process
(
struct
task_struct
*
tsk
);
extern
void
notify_parent
(
struct
task_struct
*
tsk
);
extern
void
notify_parent
(
struct
task_struct
*
tsk
,
int
signal
);
extern
void
force_sig
(
unsigned
long
sig
,
struct
task_struct
*
p
);
extern
int
send_sig
(
unsigned
long
sig
,
struct
task_struct
*
p
,
int
priv
);
extern
int
in_group_p
(
gid_t
grp
);
...
...
kernel/exit.c
View file @
4486825c
...
...
@@ -119,12 +119,12 @@ int send_sig(unsigned long sig,struct task_struct * p,int priv)
return
0
;
}
void
notify_parent
(
struct
task_struct
*
tsk
)
void
notify_parent
(
struct
task_struct
*
tsk
,
int
signal
)
{
if
(
tsk
->
p_pptr
==
task
[
smp_num_cpus
])
/* Init */
tsk
->
exit_signal
=
SIGCHLD
;
send_sig
(
tsk
->
exit_signal
,
tsk
->
p_pptr
,
1
);
wake_up_interruptible
(
&
tsk
->
p_pptr
->
wait_chldexit
);
struct
task_struct
*
parent
=
tsk
->
p_pptr
;
send_sig
(
signal
,
parent
,
1
);
wake_up_interruptible
(
&
parent
->
wait_chldexit
);
}
static
void
release
(
struct
task_struct
*
p
)
...
...
@@ -346,11 +346,10 @@ static inline void forget_original_parent(struct task_struct * father)
read_lock
(
&
tasklist_lock
);
for_each_task
(
p
)
{
if
(
p
->
p_opptr
==
father
)
if
(
task
[
smp_num_cpus
])
/* init */
p
->
p_opptr
=
task
[
smp_num_cpus
];
else
p
->
p_opptr
=
task
[
0
];
if
(
p
->
p_opptr
==
father
)
{
p
->
exit_signal
=
SIGCHLD
;
p
->
p_opptr
=
task
[
smp_num_cpus
]
?
:
task
[
0
];
/* init */
}
}
read_unlock
(
&
tasklist_lock
);
}
...
...
@@ -488,7 +487,7 @@ static void exit_notify(void)
kill_pg
(
current
->
pgrp
,
SIGCONT
,
1
);
}
/* Let father know we died */
notify_parent
(
current
);
notify_parent
(
current
,
current
->
exit_signal
);
/*
* This loop does two things:
...
...
@@ -502,15 +501,13 @@ static void exit_notify(void)
current
->
p_cptr
=
p
->
p_osptr
;
p
->
p_ysptr
=
NULL
;
p
->
flags
&=
~
(
PF_PTRACED
|
PF_TRACESYS
);
if
(
task
[
smp_num_cpus
]
&&
task
[
smp_num_cpus
]
!=
current
)
/* init */
p
->
p_pptr
=
task
[
smp_num_cpus
];
else
p
->
p_pptr
=
task
[
0
];
p
->
p_pptr
=
p
->
p_opptr
;
p
->
p_osptr
=
p
->
p_pptr
->
p_cptr
;
p
->
p_osptr
->
p_ysptr
=
p
;
p
->
p_pptr
->
p_cptr
=
p
;
if
(
p
->
state
==
TASK_ZOMBIE
)
notify_parent
(
p
);
notify_parent
(
p
,
p
->
exit_signal
);
/*
* process group orphan check
* Case ii: Our child is in a different pgrp
...
...
@@ -651,7 +648,7 @@ asmlinkage int sys_wait4(pid_t pid,unsigned int * stat_addr, int options, struct
REMOVE_LINKS
(
p
);
p
->
p_pptr
=
p
->
p_opptr
;
SET_LINKS
(
p
);
notify_parent
(
p
);
notify_parent
(
p
,
SIGCHLD
);
}
else
release
(
p
);
#ifdef DEBUG_PROC_TREE
...
...
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