diff options
author | Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> | 2019-04-30 16:15:30 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2019-04-30 18:10:08 +0200 |
commit | e33db96a14b85d2a2a414de784013637bc4e1fcc (patch) | |
tree | b528d0937a8126d29a4911583733f7919b1977e4 /winsup/cygwin/forkable.cc | |
parent | 0f5776c47ca08c31c939f4b9faf6c105b61fa688 (diff) | |
download | newlib-e33db96a14b85d2a2a414de784013637bc4e1fcc.zip newlib-e33db96a14b85d2a2a414de784013637bc4e1fcc.tar.gz newlib-e33db96a14b85d2a2a414de784013637bc4e1fcc.tar.bz2 |
Cygwin: dll_list: query dll file id at load time
NtQueryVirtualMemory for MemorySectionName does not reliable return the
changed dll file name when another process does move the file around,
and we may end up creating forkable hardlinks to wrong dll files.
So query the file id when loading the dll rather than before fork.
Diffstat (limited to 'winsup/cygwin/forkable.cc')
-rw-r--r-- | winsup/cygwin/forkable.cc | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/winsup/cygwin/forkable.cc b/winsup/cygwin/forkable.cc index 912a9ac..e78784c 100644 --- a/winsup/cygwin/forkable.cc +++ b/winsup/cygwin/forkable.cc @@ -605,10 +605,6 @@ dll_list::forkable_ntnamesize (dll_type type, PCWCHAR fullntname, PCWCHAR modnam void dll_list::prepare_forkables_nomination () { - dll *d = &dlls.start; - while ((d = d->next)) - d->stat_real_file_once (); /* uses nt_max_path_buf () */ - PWCHAR pbuf = nt_max_path_buf (); bool needsep = false; |