[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/4] startup: Mark all essential tasks as our children
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 1/4] startup: Mark all essential tasks as our children |
Date: |
Sat, 17 Apr 2021 11:27:24 +0200 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
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