On Mon, Feb 5, 2018 at 2:42 PM, Brent W. Baccala <cos...@freesoft.org> wrote:
> On Mon, Feb 5, 2018 at 1:51 AM, Samuel Thibault <samuel.thiba...@gnu.org> > 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. > OK, I think I've figured this out. The proc server's task_find() function will call add_tasks() if its hash lookup fails, and that function queries the kernel's task list and adds tasks that it doesn't know about. agape brent