This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [Bug-gnulib] Re: [PATCH] getopt, argp - reentrant getopt interface, argp fixes
- From: jay at excession dot spiral-arm dot org (James Youngman)
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: Marcus Brinkmann <marcus dot brinkmann at ruhr-uni-bochum dot de>,bug-gnulib at gnu dot org, libc-alpha at sources dot redhat dot com
- Date: Sat, 6 Mar 2004 10:25:39 +0000
- Subject: Re: [Bug-gnulib] Re: [PATCH] getopt, argp - reentrant getopt interface, argp fixes
- References: <87oerd3669.wl@ulysses.g10code.de> <40465F87.5020607@redhat.com>
On Wed, Mar 03, 2004 at 02:43:19PM -0800, Ulrich Drepper wrote:
> Marcus Brinkmann wrote:
>
> > 1. Add new reentrant interfaces for getopt (getopt_r, getopt_long_r,
> > getopt_long_only_r) and supporting data type (struct getopt_data)
> > and macro (GETOPT_DATA_INITIALIZER).
>
> No, this is ridiculous. If a program takes command line options parse
> them before creating threads or do it always only from one thread.
It's not about threads, necessarily. Marcus's email described the
scenario where there is a need to execute getopt() before a call to
getopt() in the current (and perhaps only) thread has returned.