* Merge in cygwin-64bit-branch.

This commit is contained in:
Corinna Vinschen
2013-04-23 09:44:36 +00:00
parent 1875ee55d3
commit 61522196c7
253 changed files with 10632 additions and 5055 deletions

View File

@ -176,8 +176,8 @@ forcekill (int pid, int sig, int wait)
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, %lu\n",
prog_name, (unsigned) dwpid, GetLastError ());
fprintf (stderr, "%s: couldn't kill pid %u, %u\n",
prog_name, (unsigned) dwpid, (unsigned int) GetLastError ());
CloseHandle (h);
}
@ -260,13 +260,13 @@ out:
if (!pid)
pid = strtoll (*argv, &p, 10);
if (*p != '\0'
|| (!force && (pid < LONG_MIN || pid > LONG_MAX))
|| (force && (pid <= 0 || pid > ULONG_MAX)))
|| (!force && (pid < INT_MIN || pid > INT_MAX))
|| (force && (pid <= 0 || pid > UINT_MAX)))
{
fprintf (stderr, "%s: illegal pid: %s\n", prog_name, *argv);
ret = 1;
}
else if (pid <= LONG_MAX && kill ((pid_t) pid, sig) == 0)
else if (pid <= INT_MAX && kill ((pid_t) pid, sig) == 0)
{
if (force)
forcekill ((pid_t) pid, sig, 1);