diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2023-01-17 00:25:42 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2023-01-17 21:47:33 +0300 |
commit | 62f11a5a57043404719cc5d81f3d2ebbf8142b29 (patch) | |
tree | 1c5d1c2ac73f6b8e1e493bc97f2f311ffd0ab466 /winsup/cygwin/pinfo.cc | |
parent | 39db1a7f423b5ddfdc5a8ce484757448d8e4f9d6 (diff) |
Cygwin: open_shared: don't reuse shared_locations parameter as output
For ages, open_shared uses the shared_locations parameter as
output to indicate if the mapping for a shared region has been
created or just opened. Split this into two parameters. Use
the shared_locations parameter as input only, return the creation
state of the mapping in a bool reference parameter.
Conflict: Simple collision due to missing backport of
3721a756b0d8 ("Cygwin: console: Make the console accessible from other terminals.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r-- | winsup/cygwin/pinfo.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index e086ab9a8..8dc46eead 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -387,8 +387,10 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0) for (int i = 0; i < 20; i++) { + bool created; + procinfo = (_pinfo *) open_shared (L"cygpid", n, h0, sizeof (_pinfo), - &shloc, sec_attribs, access); + shloc, created, sec_attribs, access); if (!h0) { if (createit) @@ -409,8 +411,6 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0) continue; } - bool created = shloc != SH_JUSTOPEN; - /* Just fetching info for ps or /proc, don't do anything rash. */ if (!created && !(flag & PID_NEW) && !procinfo->ppid && (flag & PID_PROCINFO)) |