DragonFly-2.3.0.881.g55d25c master sys/kern kern_time.c

Simon Schubert corecode at crater.dragonflybsd.org
Sun May 3 14:19:00 PDT 2009


commit 55d25c8782a76b25372313a908dff0a66d6ff342
Author: Simon Schubert <corecode at dragonflybsd.org>
Date:   Sun May 3 23:06:53 2009 +0200

    nanosleep: don't overwrite error with copyout success status
    
    When nanosleep gets interrupted, it returns EINTR.  In the case of a
    non-zero error status, sys_nanosleep will copyout() the remaining sleep
    time.  However it would overwrite the nanosleep error status with the
    error status of copyout() -- which is 0 (success) most of the time.  This
    means the important error status of nanosleep (EINTR) would be overwritten
    by 0.  Follow FreeBSD and NetBSD and only return the copyout status if it
    failed.
    
    Reported-by: walt

Summary of changes:
 sys/kern/kern_time.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/55d25c8782a76b25372313a908dff0a66d6ff342


-- 
DragonFly BSD source repository





More information about the Commits mailing list