* Makefile.in: Display "..." when not-verbose.
* kill.cc (forcekill): Default to entered pid when pinfo fails. Issue some warnings when things don't work.
This commit is contained in:
parent
12ffca1d84
commit
40d885eb7b
|
@ -1,3 +1,10 @@
|
|||
2003-08-31 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* Makefile.in: Display "..." when not-verbose.
|
||||
|
||||
* kill.cc (forcekill): Default to entered pid when pinfo fails. Issue
|
||||
some warnings when things don't work.
|
||||
|
||||
2003-08-17 David Rothenberger <daveroth@acm.org>
|
||||
|
||||
* dump_setup.cc (check_package_files): Strip leading / and ./ from
|
||||
|
|
|
@ -205,7 +205,7 @@ endif
|
|||
|
||||
%.exe: %.o $(ALL_DEP_LDLIBS)
|
||||
ifdef VERBOSE
|
||||
$(CXX) -o $@ ${firstword $^} -B$(cygwin_build)/ $(ALL_LDFLAGS)
|
||||
$(CXX) -o $@ ${firstword $^} -B$(cygwin_build)/ ... $(ALL_LDFLAGS)
|
||||
else
|
||||
@echo $(CXX) -o $@ ${firstword $^} ${filter-out -B%, $(ALL_LDFLAGS)};\
|
||||
$(CXX) -o $@ ${firstword $^} -B$(cygwin_build)/ $(ALL_LDFLAGS)
|
||||
|
|
|
@ -129,13 +129,16 @@ static void __stdcall
|
|||
forcekill (int pid, int sig, int wait)
|
||||
{
|
||||
external_pinfo *p = (external_pinfo *) cygwin_internal (CW_GETPINFO_FULL, pid);
|
||||
if (!p)
|
||||
return;
|
||||
HANDLE h = OpenProcess (PROCESS_TERMINATE, FALSE, (DWORD) p->dwProcessId);
|
||||
DWORD dwpid = p ? p->dwProcessId : (DWORD) pid;
|
||||
HANDLE h = OpenProcess (PROCESS_TERMINATE, FALSE, (DWORD) dwpid);
|
||||
if (!h)
|
||||
{
|
||||
fprintf (stderr, "couldn't open pid %u\n", dwpid);
|
||||
return;
|
||||
}
|
||||
if (!wait || WaitForSingleObject (h, 200) != WAIT_OBJECT_0)
|
||||
TerminateProcess (h, sig << 8);
|
||||
if (!TerminateProcess (h, sig << 8))
|
||||
fprintf (stderr, "couldn't kill pid %u, %d\n", dwpid, GetLastError ());
|
||||
CloseHandle (h);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue