DragonFly-2.2.1.7.g0c06b DragonFly_RELEASE_2_2 sys/kern kern_time.c

Simon Schubert corecode at crater.dragonflybsd.org
Sun May 3 14:20:04 PDT 2009


commit 0c06bce2ed775d9cb533090af30a71fe8023cb2f
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/0c06bce2ed775d9cb533090af30a71fe8023cb2f


-- 
DragonFly BSD source repository





More information about the Commits mailing list