Damien Zammit, le sam. 17 avril 2021 19:12:09 +1000, a ecrit:
> +  err = proc_getallpids (procserver, &pp, &npids);

That looks lame, don't we already have the list through
record_essential_task?

> +      /* ignore startup, proc, auth and kernel */
> +      if (task != mach_task_self ()
> +       && task != proctask
> +       && task != authtask
> +       && task != fstask
> +       && task != kernel_task)

I'd say rather simply drop the explicit calls

  /* Declare that the filesystem and auth are our children. */
  err = proc_child (procserver, fstask);
  assert_perror_backtrace (err);
  err = proc_child (procserver, authtask);
  assert_perror_backtrace (err);

to really migrate from marking an explicit list to just marking the list
of essential tasks.

Note however that bootstrap tasks are marking themselves as essential in
fsys_init, and it's the fsys_init call in launch_core_servers that
triggers that, so looking through the essential tasks to call proc_child
on them needs to be moved to after that, at the very end of
launch_core_servers, then.

Samuel

Reply via email to