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.3.0.881.g55d25c master sys/kern kern_time.c


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

commit 55d25c8782a76b25372313a908dff0a66d6ff342
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/55d25c8782a76b25372313a908dff0a66d6ff342


-- 
DragonFly BSD source repository



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