summaryrefslogtreecommitdiff
path: root/src/port/path.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2012-01-30 21:34:00 +0200
committerPeter Eisentraut <peter_e@gmx.net>2012-01-30 21:34:00 +0200
commitc6ea8ccea6bf23501962ddc7ac9ffdb99c8643e1 (patch)
tree30de0f6e9613755ca99ed755653f96b3bb375286 /src/port/path.c
parent423ee49b491ee966aa06259772dc38819cab786a (diff)
Use abort() instead of exit() to abort library functions
In some hopeless situations, certain library functions in libpq and libpgport quit the program. Use abort() for that instead of exit(), so we don't interfere with the normal exit codes the program might use, we clearly signal the abnormal termination, and the caller has a chance of catching the termination. This was originally pointed out by Debian's Lintian program.
Diffstat (limited to 'src/port/path.c')
-rw-r--r--src/port/path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/port/path.c b/src/port/path.c
index 932206a1a6b..be55e4af60d 100644
--- a/src/port/path.c
+++ b/src/port/path.c
@@ -445,7 +445,7 @@ get_progname(const char *argv0)
if (progname == NULL)
{
fprintf(stderr, "%s: out of memory\n", nodir_name);
- exit(1); /* This could exit the postmaster */
+ abort(); /* This could exit the postmaster */
}
#if defined(__CYGWIN__) || defined(WIN32)