diff options
author | sotech117 <michael_foiani@brown.edu> | 2024-02-20 19:49:59 +0000 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2024-02-20 19:49:59 +0000 |
commit | 9c90e73fda0d5df2e1f11b32d459d3bb07a63192 (patch) | |
tree | 29272e6765eca78d6a5a9a7c23ec435eaa138d64 /kernel/proc/proc.c | |
parent | d0c413bd585e5dc1ee2fc2bc8b4af110ef5900c6 (diff) |
small conceptual issue with retvals when threads are cancelled. will ask
Diffstat (limited to 'kernel/proc/proc.c')
-rw-r--r-- | kernel/proc/proc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/proc/proc.c b/kernel/proc/proc.c index 7350acb..a1f68f8 100644 --- a/kernel/proc/proc.c +++ b/kernel/proc/proc.c @@ -268,7 +268,11 @@ void proc_cleanup(long status) // update state and status curproc->p_state = PROC_DEAD; - curproc->p_status = status; + if (curthr->kt_cancelled) { + curproc->p_status = curthr->kt_retval; + } else { + curproc->p_status = status; + } } /* |