Skip to content

Commit f1e0044

Browse files
committed
When under postmaster, bogus arguments should cause proc_exit(0) not
proc_exit(1). Unless you think a system-wide restart is an appropriate response to bogus PGOPTIONS, that is.
1 parent 2b0f8ae commit f1e0044

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/tcop/postgres.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.207 2001/02/18 04:28:31 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.208 2001/02/24 02:04:51 tgl Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -1537,7 +1537,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
15371537
if (errs || argc != optind || DBName == NULL)
15381538
{
15391539
fprintf(stderr, "%s: invalid command line arguments\nTry -? for help.\n", argv[0]);
1540-
proc_exit(1);
1540+
proc_exit(0); /* not 1, that causes system-wide restart... */
15411541
}
15421542
pq_init(); /* initialize libpq at backend startup */
15431543
whereToSendOutput = Remote;
@@ -1680,7 +1680,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
16801680
if (!IsUnderPostmaster)
16811681
{
16821682
puts("\nPOSTGRES backend interactive interface ");
1683-
puts("$Revision: 1.207 $ $Date: 2001/02/18 04:28:31 $\n");
1683+
puts("$Revision: 1.208 $ $Date: 2001/02/24 02:04:51 $\n");
16841684
}
16851685

16861686
/*

0 commit comments

Comments
 (0)