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

Commit1f35944

Browse files
committed
In pg_upgrade, clean up handling of invalid directory specification by
checking the stat() errno value more strictly.
1 parent772a5f1 commit1f35944

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎contrib/pg_upgrade/exec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ is_server_running(const char *datadir)
7070

7171
if ((fd=open(path,O_RDONLY,0))<0)
7272
{
73-
if (errno!=ENOENT)
74-
/* issue a warning but continue so we can throw a clearer error later */
75-
pg_log(PG_WARNING,"could not open file \"%s\" for reading\n",
73+
/* ENOTDIR means we will throw a more useful error later */
74+
if (errno!=ENOENT&&errno!=ENOTDIR)
75+
pg_log(PG_FATAL,"could not open file \"%s\" for reading\n",
7676
path);
7777

7878
return false;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp