mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
Make the win32 implementation of getrusage() return EINVAL if being
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.
This commit is contained in:
parent
36f0b1cab7
commit
14e6858ff4
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/port/getrusage.c,v 1.14 2008/01/01 19:46:00 momjian Exp $
|
* $PostgreSQL: pgsql/src/port/getrusage.c,v 1.15 2008/05/14 07:28:13 mha Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -41,6 +41,13 @@ getrusage(int who, struct rusage * rusage)
|
|||||||
FILETIME usertime;
|
FILETIME usertime;
|
||||||
ULARGE_INTEGER li;
|
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)
|
if (rusage == (struct rusage *) NULL)
|
||||||
{
|
{
|
||||||
errno = EFAULT;
|
errno = EFAULT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user