* ps.cc (main): Accomodate new PID_ constant.
This commit is contained in:
parent
1dc16fc74b
commit
5460fae73f
|
@ -1,3 +1,7 @@
|
||||||
|
Sat Oct 14 23:42:58 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
|
* ps.cc (main): Accomodate new PID_ constant.
|
||||||
|
|
||||||
Thu Oct 12 02:19:12 2000 Christopher Faylor <cgf@cygnus.com>
|
Thu Oct 12 02:19:12 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
* strace.cc (proc_child): Handle exceptions correctly.
|
* strace.cc (proc_child): Handle exceptions correctly.
|
||||||
|
|
|
@ -246,8 +246,6 @@ main (int argc, char *argv[])
|
||||||
(p = (external_pinfo *) cygwin_internal (query, pid | CW_NEXTPID));
|
(p = (external_pinfo *) cygwin_internal (query, pid | CW_NEXTPID));
|
||||||
pid = p->pid)
|
pid = p->pid)
|
||||||
{
|
{
|
||||||
if (p->process_state == PID_NOT_IN_USE)
|
|
||||||
continue;
|
|
||||||
if (!aflag && p->uid != uid)
|
if (!aflag && p->uid != uid)
|
||||||
continue;
|
continue;
|
||||||
char status = ' ';
|
char status = ' ';
|
||||||
|
@ -259,7 +257,7 @@ main (int argc, char *argv[])
|
||||||
status = 'O';
|
status = 'O';
|
||||||
|
|
||||||
char pname[MAX_PATH];
|
char pname[MAX_PATH];
|
||||||
if (p->process_state & PID_ZOMBIE)
|
if (p->process_state & (PID_ZOMBIE | PID_EXITED))
|
||||||
strcpy (pname, "<defunct>");
|
strcpy (pname, "<defunct>");
|
||||||
else if (p->ppid)
|
else if (p->ppid)
|
||||||
{
|
{
|
||||||
|
|
|
@ -536,7 +536,14 @@ proc_child (unsigned mask, FILE *ofile)
|
||||||
break;
|
break;
|
||||||
case EXCEPTION_DEBUG_EVENT:
|
case EXCEPTION_DEBUG_EVENT:
|
||||||
if (ev.u.Exception.ExceptionRecord.ExceptionCode != STATUS_BREAKPOINT)
|
if (ev.u.Exception.ExceptionRecord.ExceptionCode != STATUS_BREAKPOINT)
|
||||||
status = DBG_EXCEPTION_NOT_HANDLED;
|
{
|
||||||
|
status = DBG_EXCEPTION_NOT_HANDLED;
|
||||||
|
#if 0
|
||||||
|
fprintf (stderr, "exception %p at %p\n",
|
||||||
|
ev.u.Exception.ExceptionRecord.ExceptionCode,
|
||||||
|
ev.u.Exception.ExceptionRecord.ExceptionAddress);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!ContinueDebugEvent (ev.dwProcessId, ev.dwThreadId, status))
|
if (!ContinueDebugEvent (ev.dwProcessId, ev.dwThreadId, status))
|
||||||
|
|
Loading…
Reference in New Issue