Justus Winter, le Wed 12 Nov 2014 16:49:08 +0100, a écrit :
> +kern_return_t
> +register_new_task_notification(
> + const host_t host,
> + ipc_port_t notification)
> +{
> + if (host == HOST_NULL)
> + return KERN_INVALID_HOST;
> +
> + if (new_task_notification != NULL)
> + return KERN_NO_ACCESS;
> +
> + new_task_notification = notification;
> + return KERN_SUCCESS;
> +}
Mmm, doesn't this need some additional reference on the notification
port? Of course, proc is not supposed to die, but better be safe than
sorry :)
Samuel