Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e6ceb32aa25fc33f21af84cc7a32fe289b3e860c
Commit:     e6ceb32aa25fc33f21af84cc7a32fe289b3e860c
Parent:     14816b1e2b0eb24ef41dbe37dcb558338e54a603
Author:     Scott James Remnant <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 28 16:22:07 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Nov 29 09:24:55 2007 -0800

    wait_task_stopped(): pass correct exit_code to wait_noreap_copyout()
    
    In wait_task_stopped() exit_code already contains the right value for the
    si_status member of siginfo, and this is simply set in the non WNOWAIT
    case.
    
    If you call waitid() with a stopped or traced process, you'll get the signal
    in siginfo.si_status as expected -- however if you call waitid(WNOWAIT) at 
the
    same time, you'll get the signal << 8 | 0x7f
    
    Pass it unchanged to wait_noreap_copyout(); we would only need to shift it
    and add 0x7f if we were returning it in the user status field and that
    isn't used for any function that permits WNOWAIT.
    
    Signed-off-by: Scott James Remnant <[EMAIL PROTECTED]>
    Signed-off-by: Oleg Nesterov <[EMAIL PROTECTED]>
    Cc: Roland McGrath <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/exit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/exit.c b/kernel/exit.c
index 0a4a382..549c055 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1388,7 +1388,7 @@ static int wait_task_stopped(struct task_struct *p, int 
delayed_group_leader,
                if (unlikely(!exit_code) || unlikely(p->exit_state))
                        goto bail_ref;
                return wait_noreap_copyout(p, pid, uid,
-                                          why, (exit_code << 8) | 0x7f,
+                                          why, exit_code,
                                           infop, ru);
        }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to