This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH RFC] fork: reduce chances for "address space is already occupied" errors
- From: Michael Haubenwallner <michael dot haubenwallner at ssi-schaefer dot com>
- To: cygwin-patches at cygwin dot com
- Date: Tue, 9 Apr 2019 11:00:21 +0200
- Subject: Re: [PATCH RFC] fork: reduce chances for "address space is already occupied" errors
- References: <8c77b589-fcae-fd0d-f5c5-c2520cfebbfa@ssi-schaefer.com> <20190326182538.GA4096@calimero.vinschen.de> <20190326182824.GB4096@calimero.vinschen.de> <c52ec077-d1e6-f61a-df9c-fe9ede1ba1ff@ssi-schaefer.com> <87y350ytpb.fsf@Rainer.invalid> <9c38ac1d-4dea-12d4-a63b-6e8ec59b3ae8@ssi-schaefer.com> <0f0d7cd6-e770-fc32-f28f-817b700e4d87@SystematicSw.ab.ca> <f5ab5a82-8d26-4898-7ea4-ecef5c377299@ssi-schaefer.com> <abf543bb-e8df-9eeb-5ae8-63e5d59cca9a@SystematicSw.ab.ca> <87sgv65eyc.fsf@Rainer.invalid> <5fa27e1c-a790-f03d-b4b3-1985f26df128@SystematicSw.ab.ca> <87pnq9jupk.fsf@Rainer.invalid> <a83dedc6-ea5b-5fc9-4bbc-f06a9cf19472@SystematicSw.ab.ca> <878sww93g9.fsf@Rainer.invalid> <97aec921-d9b1-3b0e-de7a-d492832ba481@SystematicSw.ab.ca> <236d3269-1b0b-9da0-9816-ed84e489f73e@ssi-schaefer.com> <87ef6jmfwv.fsf@Rainer.invalid> <437a6a24-4428-ad14-f6bb-16ff23679c30@ssi-schaefer.com> <87mul0zanq.fsf@Rainer.invalid>
On 4/8/19 7:09 PM, Achim Gratz wrote:
> Michael Haubenwallner writes:
>> Well... once installed, a dll may get in use quickly, because I can not require
>> to shut down all Cygwin processes. So I need to rebase and register the dll in
>> some staging directory before it is installed into it's final directory, hence
>> I'm about to add some new '--destdir' option.
>
> I don't quite understand yet what you're trying to do and why, but
> "--destdir" doesn't have the right ring to it for my ears. If I'm not
> mistaken you want to strip the staging prefix from the database entry,
> which incidentally would be where a
>
> make DESTDIR=/staging install
>
> would have placed the files?
Exactly, the _rebase_ needs to be done while the files are in /staging,
but the database records need to not have the /staging part of course.
However, updating the _database_ can be done either while the files are
in /staging still, or when they are at their final location later on.
I just need to avoid performing a rebase to files in their final location.
For the moment, I'm doing the database update together with performing the
rebase in /staging, so I need to tell rebase.exe about "/staging" to strip
from the database record. This boils down to:
$ find /staging -type f -name '*.dll' > files.list
$ rebase --database --filelist=files.list --destdir=/staging
But I'm facing some fork problems now, where I need to investigate whether
they're related to my rebase step, before I can submit the patches.
If curious, see https://github.com/haubi/cygwin-rebase/commits/gentoo
Thanks!
/haubi/
PS: I've tried to submit the first two patches yesterday, but somehow the
mails didn't make it to the list.