DragonFly commits List (threaded) for 2009-05
DragonFly BSD
DragonFly commits List (threaded) for 2009-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Simon Schubert <corecode@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 3 May 2009 14:19:14 -0700 (PDT)

commit 0c06bce2ed775d9cb533090af30a71fe8023cb2f
Author: Simon Schubert <corecode@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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]