|
4 | 4 | *
|
5 | 5 | * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
6 | 6 | *
|
7 |
| - * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.101 2008/06/2602:47:19 momjian Exp $ |
| 7 | + * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.102 2008/06/2603:51:56 momjian Exp $ |
8 | 8 | *
|
9 | 9 | *-------------------------------------------------------------------------
|
10 | 10 | */
|
@@ -601,18 +601,14 @@ read_post_opts(void)
|
601 | 601 | len=strcspn(optline,"\r\n");
|
602 | 602 | optline[len]='\0';
|
603 | 603 |
|
604 |
| -for (arg1=optline;*arg1;arg1++) |
| 604 | +/* |
| 605 | + * Are we at the first option, as defined by space and |
| 606 | + * double-quote? |
| 607 | + */ |
| 608 | +if ((arg1=strstr(optline," \""))!=NULL) |
605 | 609 | {
|
606 |
| -/* |
607 |
| - * Are we at the first option, as defined by space, |
608 |
| - * double-quote, and a dash? |
609 |
| - */ |
610 |
| -if (*arg1==' '&&*(arg1+1)=='"'&&*(arg1+2)=='-') |
611 |
| -{ |
612 |
| -*arg1='\0';/* terminate so we get only program name */ |
613 |
| -post_opts=arg1+1;/* point past whitespace */ |
614 |
| -break; |
615 |
| -} |
| 610 | +*arg1='\0';/* terminate so we get only program name */ |
| 611 | +post_opts=arg1+1;/* point past whitespace */ |
616 | 612 | }
|
617 | 613 | if (postgres_path!=NULL)
|
618 | 614 | postgres_path=optline;
|
|