Small security patches
Fri Dec 13 07:23:00 GMT 2002
On Fri, Dec 13, 2002 at 09:51:58AM -0500, Pierre A. Humblet wrote:
>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 ()?
That's what dll_crt0_1 is for. You're going to have to call the functions
from someplace and dll_crt0_1 is designed for that.
To answer your question, yes, you can tell if you've been either forked
or execed. Rather than maintain an initialized variable, you can always
More information about the Cygwin-patches