diff options
Diffstat (limited to 'winsup/cygwin/forkable.cc')
-rw-r--r-- | winsup/cygwin/forkable.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/winsup/cygwin/forkable.cc b/winsup/cygwin/forkable.cc index cc28f9f4f..da45643ae 100644 --- a/winsup/cygwin/forkable.cc +++ b/winsup/cygwin/forkable.cc @@ -522,6 +522,11 @@ dll::create_forkable () size_t dll_list::forkable_ntnamesize (dll_type type, PCWCHAR fullntname, PCWCHAR modname) { + /* per process, this is the first forkables-method ever called */ + if (forkables_needs == forkables_unknown && + !cygwin_shared->prefer_forkable_hardlinks) + forkables_needs = forkables_impossible; /* short cut */ + if (forkables_needs == forkables_impossible) return 0; @@ -667,6 +672,7 @@ dll_list::update_forkables_needs () { debug_printf ("impossible, not on NTFS %W", fn.Buffer); forkables_needs = forkables_impossible; + cygwin_shared->prefer_forkable_hardlinks = 0; } } @@ -1056,6 +1062,13 @@ dll_list::request_forkables () set_forkables_inheritance (true); + if (forkables_needs == forkables_disabled) + { + /* we do not support (re-)enabling on the fly */ + forkables_needs = forkables_impossible; + cygwin_shared->prefer_forkable_hardlinks = 0; + } + if (forkables_needs <= forkables_needless) return; |