Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25515
b: refs/heads/master
c: f5e9028
h: refs/heads/master
i:
  25513: 9af4b73
  25511: 75ce824
v: v3
  • Loading branch information
Roland McGrath authored and Linus Torvalds committed Apr 11, 2006
1 parent 66acddf commit 949d0ca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 491d4bed8051c655c7664b85446e13901463eb63
refs/heads/master: f5e902817fee1589badca1284f49eecc0ef0c200
12 changes: 12 additions & 0 deletions trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,18 @@ static int de_thread(struct task_struct *tsk)
while (leader->exit_state != EXIT_ZOMBIE)
yield();

/*
* The only record we have of the real-time age of a
* process, regardless of execs it's done, is start_time.
* All the past CPU time is accumulated in signal_struct
* from sister threads now dead. But in this non-leader
* exec, nothing survives from the original leader thread,
* whose birth marks the true age of this process now.
* When we take on its identity by switching to its PID, we
* also take its birthdate (always earlier than our own).
*/
current->start_time = leader->start_time;

spin_lock(&leader->proc_lock);
spin_lock(&current->proc_lock);
proc_dentry1 = proc_pid_unhash(current);
Expand Down

0 comments on commit 949d0ca

Please sign in to comment.