projects
/
users
/
simon
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c685bd1
)
Make the win32 implementation of getrusage() return EINVAL if being
author
Magnus Hagander
<magnus@hagander.net>
Wed, 14 May 2008 07:28:13 +0000
(07:28 +0000)
committer
Magnus Hagander
<magnus@hagander.net>
Wed, 14 May 2008 07:28:13 +0000
(07:28 +0000)
asked for anything other than RUSAGE_SELF, since it's not supported.
This is never called anywhere in the code today, but might be in
the future.
Not backpatching, since it's not called anywhere today.
src/port/getrusage.c
patch
|
blob
|
blame
|
history
diff --git
a/src/port/getrusage.c
b/src/port/getrusage.c
index 86edadc2b61adda3e99065af9bb10da9d7b67aee..c56926763ceb0a71b92ed9ba801c9c669fc306d4 100644
(file)
--- a/
src/port/getrusage.c
+++ b/
src/port/getrusage.c
@@
-41,6
+41,13
@@
getrusage(int who, struct rusage * rusage)
FILETIME usertime;
ULARGE_INTEGER li;
+ if (who != RUSAGE_SELF)
+ {
+ /* Only RUSAGE_SELF is supported in this implementation for now */
+ errno = EINVAL;
+ return -1;
+ }
+
if (rusage == (struct rusage *) NULL)
{
errno = EFAULT;