You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Henrik Vendelbo <hv...@bluprints.com> on 1999/10/14 01:15:22 UTC

multithreaded & static char[]

While I looked for the _getch, I noticed "static char password[MAX_STRING_LEN];". 

Is there some kind of semaphore check to avoid two treads using getpass at the same time ?

\Henrik


Re: multithreaded & static char[]

Posted by Ryan Bloom <rb...@raleigh.ibm.com>.
We are using a static string, because we are emulating a UNIX standard
function, which uses a static string.  We do not need any locking, because
of how this is used.  If you look at where this function is used, it is
ONLY used in support programs, which are by definition single threaded.

In the future, we may want to change this to be thread-safe, but it is not
an immediate concern for Apache.

Ryan

On Thu, 14 Oct 1999, Henrik Vendelbo wrote:

> While I looked for the _getch, I noticed "static char password[MAX_STRING_LEN];". 
> 
> Is there some kind of semaphore check to avoid two treads using getpass at the same time ?
> 
> \Henrik
> 

_______________________________________________________________________
Ryan Bloom		rbb@raleigh.ibm.com
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.