summaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_files.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2012-02-16 11:49:20 -0500
committerRobert Haas <rhaas@postgresql.org>2012-02-16 11:49:20 -0500
commite9a22259c45e235aaa30f0d068f767d9c0f818a0 (patch)
tree35b434f8f3ee8b00e0ee2fd88271f01a7035778d /src/bin/pg_dump/pg_backup_files.c
parent4bfe68dfab009ce8fcaea79dc0832eadf3380051 (diff)
Invent on_exit_nicely for pg_dump.
Per recent discussions on pgsql-hackers regarding parallel pg_dump.
Diffstat (limited to 'src/bin/pg_dump/pg_backup_files.c')
-rw-r--r--src/bin/pg_dump/pg_backup_files.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/bin/pg_dump/pg_backup_files.c b/src/bin/pg_dump/pg_backup_files.c
index ffcbb8f6425..71bace0eab7 100644
--- a/src/bin/pg_dump/pg_backup_files.c
+++ b/src/bin/pg_dump/pg_backup_files.c
@@ -127,15 +127,15 @@ InitArchiveFmt_Files(ArchiveHandle *AH)
{
AH->FH = fopen(AH->fSpec, PG_BINARY_W);
if (AH->FH == NULL)
- die_horribly(NULL, modulename, "could not open output file \"%s\": %s\n",
- AH->fSpec, strerror(errno));
+ exit_horribly(modulename, "could not open output file \"%s\": %s\n",
+ AH->fSpec, strerror(errno));
}
else
{
AH->FH = stdout;
if (AH->FH == NULL)
- die_horribly(NULL, modulename, "could not open output file: %s\n",
- strerror(errno));
+ exit_horribly(modulename, "could not open output file: %s\n",
+ strerror(errno));
}
ctx->hasSeek = checkSeek(AH->FH);
@@ -152,15 +152,15 @@ InitArchiveFmt_Files(ArchiveHandle *AH)
{
AH->FH = fopen(AH->fSpec, PG_BINARY_R);
if (AH->FH == NULL)
- die_horribly(NULL, modulename, "could not open input file \"%s\": %s\n",
- AH->fSpec, strerror(errno));
+ exit_horribly(modulename, "could not open input file \"%s\": %s\n",
+ AH->fSpec, strerror(errno));
}
else
{
AH->FH = stdin;
if (AH->FH == NULL)
- die_horribly(NULL, modulename, "could not open input file: %s\n",
- strerror(errno));
+ exit_horribly(modulename, "could not open input file: %s\n",
+ strerror(errno));
}
ctx->hasSeek = checkSeek(AH->FH);