1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Replace the confusing exit_nicely() by an atexit/on_exit hook

This commit is contained in:
Peter Eisentraut
2011-04-06 23:00:44 +03:00
parent 2bd78eb8d5
commit c75163842c
5 changed files with 37 additions and 43 deletions

View File

@ -77,12 +77,12 @@ parseCommandLine(int argc, char *argv[])
strcmp(argv[1], "-?") == 0)
{
usage();
exit_nicely(false);
exit(0);
}
if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
{
pg_log(PG_REPORT, "pg_upgrade " PG_VERSION "\n");
exit_nicely(false);
exit(0);
}
}
@ -125,7 +125,7 @@ parseCommandLine(int argc, char *argv[])
if ((log_opts.debug_fd = fopen(optarg, "w")) == NULL)
{
pg_log(PG_FATAL, "cannot open debug file\n");
exit_nicely(false);
exit(1);
}
break;
@ -141,7 +141,7 @@ parseCommandLine(int argc, char *argv[])
if ((old_cluster.port = atoi(optarg)) <= 0)
{
pg_log(PG_FATAL, "invalid old port number\n");
exit_nicely(false);
exit(1);
}
break;
@ -149,7 +149,7 @@ parseCommandLine(int argc, char *argv[])
if ((new_cluster.port = atoi(optarg)) <= 0)
{
pg_log(PG_FATAL, "invalid new port number\n");
exit_nicely(false);
exit(1);
}
break;