aboutsummaryrefslogtreecommitdiff
path: root/proc/host.c
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2021-05-26 16:40:47 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-10 22:12:30 +0200
commit111e1a54234613eb5055903cffa20d1f1e6a659e (patch)
tree9613e1deb5199ee8299bf668e997a2ed91ecfe0b /proc/host.c
parent2c6c2b011eda70abac23c6ff9702917485f9ed3b (diff)
downloadhurd-111e1a54234613eb5055903cffa20d1f1e6a659e.tar.gz
hurd-111e1a54234613eb5055903cffa20d1f1e6a659e.tar.bz2
hurd-111e1a54234613eb5055903cffa20d1f1e6a659e.zip
proc: Use ports_request_dead_name_notification ()
Diffstat (limited to 'proc/host.c')
-rw-r--r--proc/host.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/proc/host.c b/proc/host.c
index 991d1335..4cfd710e 100644
--- a/proc/host.c
+++ b/proc/host.c
@@ -184,9 +184,9 @@ S_proc_execdata_notify (struct proc *p,
mach_port_t notify)
{
struct execdata_notify *n;
- mach_port_t foo;
- /* No need to check P here; we don't use it. */
+ if (!p)
+ return EOPNOTSUPP;
n = malloc (sizeof (struct execdata_notify));
if (! n)
@@ -196,13 +196,7 @@ S_proc_execdata_notify (struct proc *p,
n->next = execdata_notifys;
execdata_notifys = n;
- mach_port_request_notification (mach_task_self (), notify,
- MACH_NOTIFY_DEAD_NAME, 1,
- generic_port, MACH_MSG_TYPE_MAKE_SEND_ONCE,
- &foo);
-
- if (foo)
- mach_port_deallocate (mach_task_self (), foo);
+ ports_request_dead_name_notification (p, notify, NULL);
if (std_port_array)
exec_setexecdata (n->notify_port, std_port_array, MACH_MSG_TYPE_COPY_SEND,