projects
/
postgres-xl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59f10ff
)
Make failure to open psql's --log-file fatal.
author
Tom Lane
<
[email protected]
>
Tue, 8 Dec 2015 22:14:46 +0000
(17:14 -0500)
committer
Tom Lane
<
[email protected]
>
Tue, 8 Dec 2015 22:14:46 +0000
(17:14 -0500)
Commit
344cdff2c
made failure to open the target of --output fatal.
For consistency, the --log-file switch should behave similarly.
Like the previous commit, back-patch to 9.5 but no further.
Daniel Verite
src/bin/psql/startup.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/psql/startup.c
b/src/bin/psql/startup.c
index a6e23c2f3e4fb7c117866b963fe730d384957559..8b1777e24366eeaf1e6ccf5cee48db2784bdbd91 100644
(file)
--- a/
src/bin/psql/startup.c
+++ b/
src/bin/psql/startup.c
@@
-274,8
+274,11
@@
main(int argc, char *argv[])
{
pset.logfile = fopen(options.logfilename, "a");
if (!pset.logfile)
+ {
fprintf(stderr, _("%s: could not open log file \"%s\": %s\n"),
pset.progname, options.logfilename, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
}
/*