summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-05-09 19:28:31 +0000
committerBruce Momjian <bruce@momjian.us>2001-05-09 19:28:31 +0000
commitf598201348646dd06ff2278197bc90182d09f1ac (patch)
tree6897bdbc732beeaabaa283cafe021de9c4fac969 /src
parentfae69dd183416980bbfc3daf6293b46894276bb3 (diff)
Noticed a small bug in the code. Probably been there for some time. Note
that the original code would consider things like UNIX domain sockets are regular files. Gavin Sherry
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/init/findbe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/utils/init/findbe.c b/src/backend/utils/init/findbe.c
index 507e3db2099..085784d11de 100644
--- a/src/backend/utils/init/findbe.c
+++ b/src/backend/utils/init/findbe.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.21 2001/04/21 18:29:29 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.22 2001/05/09 19:28:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -74,7 +74,9 @@ ValidateBinary(char *path)
path);
return -1;
}
- if (!(buf.st_mode & S_IFREG))
+
+
+ if ((buf.st_mode & S_IFMT) != S_IFREG)
{
if (DebugLvl > 1)
fprintf(stderr, "ValidateBinary: \"%s\" is not a regular file\n",