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;
{
debug_printf ("impossible, not on NTFS %W", fn.Buffer);
forkables_needs = forkables_impossible;
+ cygwin_shared->prefer_forkable_hardlinks = 0;
}
}
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;
regions. It is incremented when incompatible changes are made to the shared
memory region *or* to any named shared mutexes, semaphores, etc. */
-#define CYGWIN_VERSION_SHARED_DATA 5
+#define CYGWIN_VERSION_SHARED_DATA 6
/* An identifier used in the names used to create shared objects. The full
names include the CYGWIN_VERSION_SHARED_DATA version as well as this
/* Data accessible to all tasks */
-#define CURR_SHARED_MAGIC 0x6758de88U
+#define CURR_SHARED_MAGIC 0x3a6025edU
#define USER_VERSION 1
mtinfo mt;
loadavginfo loadavg;
LONG pid_src;
+ char prefer_forkable_hardlinks; /* single byte access always is atomic */
void initialize ();
void init_obcaseinsensitive ();