From e9a22259c45e235aaa30f0d068f767d9c0f818a0 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Thu, 16 Feb 2012 11:49:20 -0500 Subject: Invent on_exit_nicely for pg_dump. Per recent discussions on pgsql-hackers regarding parallel pg_dump. --- src/bin/pg_dump/pg_backup_files.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/bin/pg_dump/pg_backup_files.c') 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); -- cgit v1.2.3