Re: why was the VAR 'optind' never changed in initdb? - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: why was the VAR 'optind' never changed in initdb?
Date
Msg-id 4F82DAE8.2000300@dunslane.net
Whole thread Raw
In response to why was the VAR 'optind' never changed in initdb?  (Clover White <mywhiteclover@gmail.com>)
Responses Re: why was the VAR 'optind' never changed in initdb?  (Clover White <mywhiteclover@gmail.com>)
List pgsql-hackers

On 04/09/2012 07:38 AM, Clover White wrote:
> Hi,
>   I'm debugging initdb using gdb.
>   I found that I could not step in the function getopt_long in line 
> 2572 in initdb.c.
>   I also found that the value of VAR optind never be changed. VAR 
> optind is always equal to 1 but how could optind be larger than the 
> value of argc(the value of argc is 6) in line 2648 and 2654.
>
> I was so confused. Could someone give me some help? Thank you~
>
>

Why do you expect it to be? Perhaps if you tell us what problem you're 
actually trying to solve we can help you better.

cheers

andrew


pgsql-hackers by date:

Previous
From: Clover White
Date:
Subject: why was the VAR 'optind' never changed in initdb?
Next
From: Euler Taveira
Date:
Subject: Re: [patch] for "psql : Allow processing of multiple -f (file) options "