This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: Perl Win32::Shortcut screws up fork


On Thu, Jul 07, 2005 at 06:41:31PM -0700, Brian Dessent wrote:
>Christopher Faylor wrote:
>>>I think we will require a statically linked bash, or some kind of
>>>trickery in the rebaseall script.  One potential way around this might
>>>be for it to output a .cmd file (or .bat under 9x, grrr) and then exec()
>>>$COMSPEC to run the commands.  This would have the advantage of not
>>>requiring any Cygwin DLLs in use during the rebase, but it sounds more
>>>error prone and complicated.
>>
>>But, the alternative of creating a version of bash just so that people
>>can run rebaseall sounds even more error prone.
>>
>>I don't see any other foolproof way of doing this.
>>
>>Btw, don't '.bat' files work on NT, too?
>
>By 'error prone' I meant that the current rebaseall script knows to stop
>the process when the first error happens.  A .bat file would just try to
>plow through without checking, though you could certainly write more
>logic to check the errorlevel.  But you would have to limit yourself to
>the command.com level of functionality, which is pretty prehistoric
>IIRC.

I was thinking that rebaseall would just create a simple .bat file which
would be run when no other cygwin process was running.  The only thing I
see in rebaseall that wouldn't be doable in a .bat file is the
cleanup-on-error part.  The only thing you couldn't do then is
cleanup-on-error.

If rebaseall wanted to be really clever, it could detect dlls that are
currently loaded into memory, copy them to another temporary name,
rebase those dlls, and then set things up so that the correct dlls are
copied on reboot.  Or a program or .bat file could be run at the user's
discretion to rename the dlls to the correct name.  This would be run
when all cygwin processes had exited.

Or, perhaps we should make sure that the dlls used by bash are already
nicely based and tell rebase to 1) make sure that no other dlls are
rebased into their load address and 2) ignore the dlls.  That's probably
the ultimate solution.

>Option B would be to write a C or C++ program to do the job of what
>rebaseall currently does.  That's even more work.

I was going to suggest that but it requires that the user had loaded
the C compiler which seems like overkill for this.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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