RFC: [PATCH 0/6] When fork fails, retry with hardlinks.

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Dec 8 15:51:00 GMT 2016

On Dec  7 11:58, Michael Haubenwallner wrote:
> Hi Corinna (et al.),
> now with NtQueryVirtualMemory(MemorySectionName) I've been able to drop
> the need to early open any file, and any check for modified binaries.
> Instead, only the failing fork call is the trigger to create the
> hardlinks (if possible) - followed by a second fork call then.

Would you mind to create a brief tl;dr overview with bullet points to
describe what happens at which point?

> One question: During dlopen rework I've learned about tmp_pathbuf:
> Unlike in child process startup, where tmp_pathbuf is not initialised
> yet (have nt_max_path_buffer instead), do you see a reason to not use
> tmp_pathbuf during hardlink creation in parent process (patch 3)?

No, that's fine.

> The idea there is to really catch the right file for when that file is
> just being renamed - that needs the second filename buffer to compare.
> Other than that: What do you think about these patches now?

I'm still reluctant in terms of the impact of this change.  It seems the
latest version has much less overhead in the default case, which is, no
DLLs and executables has been removed, but I'm not yet sure about
including it in master.

For the time being, I created a topic branch called "topic/forkables"
with this patch.  I'm a bit over my head at the moment, but we should
definitely start testing this after the christmas break.  If you have
changes, feel free to send them to the cygwin-patches list and I'll
apply them to the topic branch(*).


(*) Note that the topic branch will see a forced push once in a while
    when the branch needs to be rebased to master.  That's why the
    branch is called "topic/...".  Those branches are the only ones
    allowing forced push.

Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20161208/b7e4d3f6/attachment.sig>

More information about the Cygwin-developers mailing list