summaryrefslogtreecommitdiff
path: root/trans
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-07-13 03:02:31 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-07-13 03:02:31 +0000
commit25e1258dbecc455cb2cc2bd7824729e7171574eb (patch)
tree7c421c9389b328949e719dc45178331c5c743867 /trans
parentb3826b57025371c0ef7e341439d8db236d50a05b (diff)
(stop_pgrp): Fetch pgrp using correct call.
Diffstat (limited to 'trans')
-rw-r--r--trans/crash.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/trans/crash.c b/trans/crash.c
index 863499e5..5947cb26 100644
--- a/trans/crash.c
+++ b/trans/crash.c
@@ -81,16 +81,19 @@ struct port_class *crasher_portclass;
void
stop_pgrp (process_t userproc, mach_port_t cttyid)
{
- pid_t pid, pgrp;
+ pid_t pid, ppid, pgrp;
int orphaned;
error_t err;
size_t numpids = 20;
pid_t pids_[numpids], *pids = pids_;
int i;
- err = proc_getpids (userproc, &pid, &pgrp, &orphaned);
+ err = proc_getpids (userproc, &pid, &ppid, &orphaned);
if (err || orphaned)
return;
+ err = proc_getpgrp (userproc, pid, &pgrp);
+ if (err)
+ return;
/* Use USERPROC so that if it's just died we get an error and don't do
anything. */