Re: why was the VAR 'optind' never changed in initdb?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Clover White <mywhiteclover(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: why was the VAR 'optind' never changed in initdb?
Date: 2012-04-09 12:49:44
Message-ID: 4F82DAE8.2000300@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Euler Taveira 2012-04-09 13:12:36 Re: [patch] for "psql : Allow processing of multiple -f (file) options "
Previous Message Clover White 2012-04-09 11:38:46 why was the VAR 'optind' never changed in initdb?