On Tue, 26 Jan 1999, Rodent of Unusual Size wrote:
> Dean Gaudet wrote:
> >
> > On Mon, 25 Jan 1999, Rodent of Unusual Size wrote:
> >
> > > them into return values; this frees errno for use by any
> > > other uses in the call stack
> >
> > That's false of course. errno is tainted by any libc call.
> > APR presumably will be using some of libc.
>
> I dispute the claim that it's false. Consider routine A calling
> routine B. Routine B does something that sets errno, detects it,
> and returns -1. errno is now fair game, and the value may be
> lost and no-one will know why B failed. If B returned the error,
> even if it just copied errno as its return value, errno's volatility
> would be irrelevant.
That's not what your claim said though. We're agreeing with each other.
> > > or parallel threads without losing
> > > the condition within the current call stack.
> >
> > errno has no multithread problems, not sure if you're implying
> > it does or not.
>
> I'm coming up to speed on threads and am ignorant in this area.
> Are you saying that each thread has its own copy of errno?
Yes.
Dean
> I thought it was a single global and hence susceptible to parallel
> processing stomping on it.
> --
> #ken P-)}
>
> Ken Coar <http://Web.Golux.Com/coar/>
> Apache Group member <http://www.apache.org/>
> "Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>
>
|