]> sourceware.org Git - newlib-cygwin.git/commit
forkables: Keep hardlinks disabled via shared mem.
authorMichael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
Wed, 7 Dec 2016 10:58:29 +0000 (11:58 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 7 Feb 2019 14:58:02 +0000 (15:58 +0100)
commit5a41aa6f4d5eb12a1fc2ef084d98f63d65f5fcc3
tree4bf484c2da71a91c1b2b711a335a1b460b8410ca
parentece7282f329fd3616a9a1089aa0f0c26a5c01cc1
forkables: Keep hardlinks disabled via shared mem.

To avoid the need for each process to check the filesystem to detect
that hardlink creation is impossible or disabled, cache this fact in
shared memory.  Removing cygfork directory while in use does disable
hardlinks creation.  To (re-)enable hardlinks creation, the cygfork
directory has to exist before the first cygwin process does fork.

* forkable.cc (dll_list::forkable_ntnamesize): Short cut
forkables needs to impossible when disabled via shared memory.
(dll_list::update_forkables_needs): When detecting hardlink
creation as impossible (not on NTFS) while still (we are the
first one checking) enabled via shared memory, disable the
shared memory value.
(dll_list::request_forkables): Disable the shared memory value
when hardlinks creation became disabled, that is when the
cygfork directory was removed.
* include/cygwin/version.h: Bump CYGWIN_VERSION_SHARED_DATA 6.
* shared_info.h (struct shared_info): Add member
prefer_forkable_hardlinks.  Update CURR_SHARED_MAGIC.
* shared.cc (shared_info::initialize): Initialize
prefer_forkable_hardlinks to 1 (Yes).
winsup/cygwin/forkable.cc
winsup/cygwin/include/cygwin/version.h
winsup/cygwin/shared_info.h
This page took 0.029414 seconds and 5 git commands to generate.