Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
81e51ddc
Commit
81e51ddc
authored
Nov 14, 2003
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add fflush() before popen() calls; avoids any possible problem with
double or out-of-sequence output with child process.
parent
0104fc11
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
src/bin/initdb/initdb.c
src/bin/initdb/initdb.c
+15
-9
No files found.
src/bin/initdb/initdb.c
View file @
81e51ddc
...
...
@@ -42,7 +42,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Header: /cvsroot/pgsql/src/bin/initdb/initdb.c,v 1.
8 2003/11/14 17:19:35
tgl Exp $
* $Header: /cvsroot/pgsql/src/bin/initdb/initdb.c,v 1.
9 2003/11/14 17:30:41
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -204,7 +204,9 @@ static void *xmalloc(size_t);
#define PG_CMD_OPEN \
do { \
pg = popen(cmd,PG_BINARY_W); \
fflush(stdout); \
fflush(stderr); \
pg = popen(cmd, PG_BINARY_W); \
if (pg == NULL) \
exit_nicely(); \
} while (0)
...
...
@@ -862,6 +864,10 @@ find_postgres(char *path)
snprintf
(
cmd
,
sizeof
(
cmd
),
"
\"
%s/postgres
\"
-V 2>%s"
,
path
,
DEVNULL
);
/* flush output buffers in case popen does not... */
fflush
(
stdout
);
fflush
(
stderr
);
if
((
pgver
=
popen
(
cmd
,
"r"
))
==
NULL
)
return
FIND_EXEC_ERR
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment