Cygwin: kill(1): revert casts required for 32 bit to avoid spurious warnings

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2019-02-02 15:32:28 +01:00
parent 2cd6829619
commit f5c2d4db5b
1 changed files with 3 additions and 2 deletions

View File

@ -169,14 +169,15 @@ forcekill (pid_t pid, int sig, int wait)
if (!h)
{
if (!wait || GetLastError () != ERROR_INVALID_PARAMETER)
fprintf (stderr, "%s: couldn't open pid %u\n", prog_name, dwpid);
fprintf (stderr, "%s: couldn't open pid %u\n",
prog_name, (unsigned int) dwpid);
return;
}
if (!wait || WaitForSingleObject (h, 200) != WAIT_OBJECT_0)
if (sig && !TerminateProcess (h, sig << 8)
&& WaitForSingleObject (h, 200) != WAIT_OBJECT_0)
fprintf (stderr, "%s: couldn't kill pid %u, %u\n",
prog_name, dwpid, GetLastError ());
prog_name, (unsigned int) dwpid, (unsigned int) GetLastError ());
CloseHandle (h);
}