summaryrefslogtreecommitdiff
path: root/sysdeps/posix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/clock.c2
-rw-r--r--sysdeps/posix/sleep.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/posix/clock.c b/sysdeps/posix/clock.c
index c34593b9eb..9eadc7888a 100644
--- a/sysdeps/posix/clock.c
+++ b/sysdeps/posix/clock.c
@@ -29,5 +29,5 @@ DEFUN_VOID(clock)
if (__times(&buf) < 0)
return (clock_t) -1;
- return ((buf.tms_utime + buf.tms_stime) * CLK_TCK * CLOCKS_PER_SEC);
+ return buf.tms_utime + buf.tms_stime;
}
diff --git a/sysdeps/posix/sleep.c b/sysdeps/posix/sleep.c
index 36864cbf6e..20f78a08bb 100644
--- a/sysdeps/posix/sleep.c
+++ b/sysdeps/posix/sleep.c
@@ -58,8 +58,8 @@ DEFUN(sleep, (seconds), unsigned int seconds)
act.sa_handler = sleep_handler;
act.sa_flags = 0;
- if (sigemptyset (&act.sa_mask) < 0 ||
- sigaction (SIGALRM, &act, &oact) < 0)
+ act.sa_mask = oset; /* execute handler with original mask */
+ if (sigaction (SIGALRM, &act, &oact) < 0)
return seconds;
before = time ((time_t *) NULL);