summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/portinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/portinfo.c b/utils/portinfo.c
index 7b7a35af..be30cbe1 100644
--- a/utils/portinfo.c
+++ b/utils/portinfo.c
@@ -100,6 +100,8 @@ parse_task (char *arg)
err = proc_pid2task (proc, pid, &task);
if (err)
error (11, err, "%s", arg);
+ else if (task == MACH_PORT_NULL)
+ error (11, 0, "%s: Process %d is dead and has no task", arg, (int) pid);
return task;
}