This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Wierd perl problem..


Ok.  I've just checked in changes that work around the problem "for me".
They should be in the next snapshot.

The problem was that a DLL in a forked child was not being loaded in
exactly the same location as it was in the parent.  So, when the parent
tried to copy its memory to the child -- boom!

I kludged around this by allocating memory up to the point where the
DLL should be loaded.  This is remarkably fragile and stupid but it
seems to work.

The DLL code looks like it is due for a rewrite.  Maybe we'll have time
to do that someday.

So, if you're adventurous, try out the latest snapshot and see if dynamic
loading in perl just miraculously "works" now.

-chris

In article <19991021214818.B6885@cygnus.com>,
Chris Faylor  <cygwin@sourceware.cygnus.com> wrote:
>I'm sorry.  There is a problem with using dll's after a fork with perl.
>That's what you're seeing.
>
>There is no workaround.  I hope to fix this in the next couple of months.
>
>On Thu, Oct 21, 1999 at 05:18:29PM -0600, Steve Jorgensen wrote:
>>I'm having a really strange perl problem under cygwin 1.0
>>
>>One perl script produces the following output:
>>
>>0 0 [main] d:\Cygwin\contrib\bin\perl.exe 1114 fork_copy: loaded dll data/bss pass 0 failed, 0x14043000..0x1404300C, done 0, Win32 erro
r 487
>>
>>and then hangs that shell window half the time.
>>
>>This happens when the perl script is executing the following line of
>>code:
>>
>>chop($LOCALHOST = `hostname`);
>>
>>hostname is in the path, and works fine.
>>
>>This only seems to happen if the script has a use FileHandle; line
>>after the initialization stuff I describe above, another script with
>>the exact same initialization section as the one described above works
>>fine.
>>
>>Is there something I need to do to get the FileHandle stuff working
>>under cygwin, or am I just out of luck?
-- 
cgf@cygnus.com
http://www.cygnus.com/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]