Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit14e6858

Browse files
committed
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 inthe future.Not backpatching, since it's not called anywhere today.
1 parent36f0b1c commit14e6858

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎src/port/getrusage.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/port/getrusage.c,v 1.14 2008/01/01 19:46:00 momjian Exp $
11+
* $PostgreSQL: pgsql/src/port/getrusage.c,v 1.15 2008/05/14 07:28:13 mha Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -41,6 +41,13 @@ getrusage(int who, struct rusage * rusage)
4141
FILETIMEusertime;
4242
ULARGE_INTEGERli;
4343

44+
if (who!=RUSAGE_SELF)
45+
{
46+
/* Only RUSAGE_SELF is supported in this implementation for now */
47+
errno=EINVAL;
48+
return-1;
49+
}
50+
4451
if (rusage== (structrusage*)NULL)
4552
{
4653
errno=EFAULT;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp