delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/07/22:08:17

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 7 Jul 2005 22:05:11 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Perl Win32::Shortcut screws up fork
Message-ID: <20050708020511.GA1718@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <7231C15EAC2F164CA6DC326D97493C8BA1C3FA AT exchange35 DOT fed DOT cclrc DOT ac DOT uk> <42CDD3B8 DOT 69B6AB98 AT dessent DOT net> <20050708011859 DOT GB24841 AT trixie DOT casa DOT cgf DOT cx> <42CDD9CB DOT 8390A097 AT dessent DOT net>
Mime-Version: 1.0
In-Reply-To: <42CDD9CB.8390A097@dessent.net>
User-Agent: Mutt/1.5.8i

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019