Cygwin: processes: fix handling of native Windows processes
Since commit b5e1003722
, native
Windows processes not started by Cygwin processes don't have a
Cygwin PID anymore. This breaks ps -W and kill -f <WINPID>.
Introduce MAX_PID (65536 for now).
Cygwin processes as well as native Windows processes started
from a Cygwin process get a PID < MAX_PID. All other native
Windows processes get a faked Cygwin PID >= MAX_PID.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -241,7 +241,7 @@ create_cygwin_pid ()
|
||||
do
|
||||
{
|
||||
pid = ((uint32_t) InterlockedIncrement (&cygwin_shared->pid_src))
|
||||
% 65536;
|
||||
% MAX_PID;
|
||||
}
|
||||
while (pid < 2);
|
||||
__small_swprintf (sym_name, L"cygpid.%u", pid);
|
||||
|
Reference in New Issue
Block a user