HCoop
/
bpt
/
guile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e227add
)
(scm_nice): Correction to error detection. Reported by
author
Kevin Ryde
<user42@zip.com.au>
Tue, 7 Sep 2004 00:06:18 +0000
(
00:06
+0000)
committer
Kevin Ryde
<user42@zip.com.au>
Tue, 7 Sep 2004 00:06:18 +0000
(
00:06
+0000)
Matthias Koeppe.
libguile/posix.c
patch
|
blob
|
blame
|
history
diff --git
a/libguile/posix.c
b/libguile/posix.c
index
d9cfb52
..
35f6103
100644
(file)
--- a/
libguile/posix.c
+++ b/
libguile/posix.c
@@
-1422,7
+1422,11
@@
SCM_DEFINE (scm_nice, "nice", 1, 0, 0,
"The return value is unspecified.")
#define FUNC_NAME s_scm_nice
{
- if (nice (scm_to_int (incr)) != 0)
+ /* nice() returns "prio-NZERO" on success or -1 on error, but -1 can arise
+ from "prio-NZERO", so an error must be detected from errno changed */
+ errno = 0;
+ nice (scm_to_int (incr));
+ if (errno != 0)
SCM_SYSERROR;
return SCM_UNSPECIFIED;
}