Small security patches

Pierre A. Humblet Pierre.Humblet@ieee.org
Fri Dec 13 06:51:00 GMT 2002


Corinna Vinschen wrote:
> 
> On Thu, Dec 12, 2002 at 11:34:02AM -0500, Pierre A. Humblet wrote:
> > Christopher Faylor wrote:
> > >
> > > Actually, if you can get away without using a
> > > constructor that would be best.  Constructors are a noticeable part of
> > > cygwin's startup cost.

> What about this idea:
> 
> Add a static method init() called from .  Init() checks if it has been
> called already before and returns immendiately if so.  Otherwise it
> initializes the external objects.
> 
> Shouldn't that be sufficient?

That looks great. Can that be generalized? There must be other
modules inside Cygwin that also need to initialize constant structures.
Could all of these initializers be called from some central place, if needed,
rather than having everybody maintain a separate "isinitialized" variable and
add lines in the middle of dll_crt0_1 ()?
In fact we may not even need a central "isinitialized" variable if the
centralized routine is skipped only in case of forks.

Pierre



More information about the Cygwin-patches mailing list