]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: winpids: Fix getting process multiple times, take 2
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 2 Apr 2019 11:00:22 +0000 (13:00 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Tue, 2 Apr 2019 11:00:22 +0000 (13:00 +0200)
commit557227dda3ed6ce1c4cf104cc7671d56a141da38
tree30b2b492ce15f621de938866c0373f2922fb75c5
parentde3c82ee6d28be3aa72a9c4f6e498505af79c2f3
Cygwin: winpids: Fix getting process multiple times, take 2

commit d1be0a59d48222d8ea6261ee3e59de2bc3d149e4,
"Cygwin: winpids: Fix getting process multiple times"
fixed duplicate processes in ps -W output, but it fixed
the symptom, not the cause.  It also didn't fix the problem
that the `ps' process itself may show up twice in its own
output.

This patch fixes it.  The spawn worker only deleted the
"winpid.PID" symlink of the current process if the child is
a non-Cygwin process, under the assumption that the exec'ing
process exits anyway.  However, the Window in which both
winpid.PID symlinks point to the same cygpid.PID area is just
too long.  The spawn worker now also deletes its own winpid.PID
symlink if the exec'ed process is a Cygwin process.

Additionally the fix from d1be0a59d48222d8ea6261ee3e59de2bc3d149e4
is now performed on the calling process, too.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/pinfo.cc
winsup/cygwin/release/3.0.6 [new file with mode: 0644]
winsup/cygwin/spawn.cc
This page took 0.029867 seconds and 5 git commands to generate.