[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Console client plug-in options

From: Marcus Brinkmann
Subject: Re: Console client plug-in options
Date: Fri, 8 Aug 2003 19:55:51 +0200
User-agent: Mutt/1.5.4i

On Fri, Aug 08, 2003 at 02:06:13PM +0200, Jeroen Dekkers wrote:
> On Thu, Aug 07, 2003 at 11:48:41PM +0200, Marco Gerards wrote:
> > Already tried to use an argp parser, and that worked. Unfortunately
> > there were issues with the argp parser, argp isn't reentrant. (I guess
> > I was lucky when I used it).
> Hmm, I don't see a reason why this wouldn't work. The problem is when
> different threads use argp at the same time, but this can't happen
> with the locks protecting argp. These locks are recursive, recursively
> calling argp doesn't cause a deadlock.

The comment in argp-parse.c is:

   If we can, we regulate access to getopt, which is non-reentrant, with a
   mutex.  Since the case we're trying to guard against is two different
   threads interfering, and it's possible that someone might want to call
   argp_parse recursively (they're careful), we use a recursive lock if
I wonder what this "they're careful" means.


`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    marcus@gnu.org
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]