On Mon, Feb 5, 2018 at 1:51 AM, Samuel Thibault <[email protected]>
wrote:
> Hello,
>
> Brent W. Baccala, on lun. 05 févr. 2018 00:35:17 -0500, wrote:
> > How do we know that the proc server knows about the task yet? It will
> get a
> > notification from the kernel that a new task has been created, but how
> do we
> > know that the notification has been processed yet?
>
> Isn't the notification synchronous ?
I don't see how. The kernel just sends a mach_notify_new_task message, and
there is no reply.
I see that the proc server increases its own scheduling priority (line 217
in proc/main.c), which is probably why the notification gets processed
before the fork() resumes, but I don't see anything else to achieve
synchronization.
If that's the explanation, then we should think about how to synchronize
that exchange without relying on scheduling priority.
agape
brent