Hi,
On Sun, May 10, 2026 at 02:21:25AM +0100, [email protected] wrote:
> From: Diego Nieto Cid <[email protected]>
>
> I also still need to lookup some info about the function
> `boot_script_task_create` which Samuel mentioned to be
> used to drop from SYSTEM to USER priorities.
>
I think something like the snippet below should work. But all
my tests are now broken. So there will be a v2 version of
the patch soon :)
--->8--->8---
diff --git a/kern/bootstrap.c b/kern/bootstrap.c
index 2ad11635..d5e26710 100644
--- a/kern/bootstrap.c
+++ b/kern/bootstrap.c
@@ -860,6 +860,8 @@ boot_script_task_create (struct cmd *cmd)
return BOOT_SCRIPT_MACH_ERROR;
}
task_set_name(cmd->task, cmd->path);
+ task_max_priority(realhost.host_self, cmd->task,
+ BASEPRI_USER, TRUE, TRUE);
return 0;
}
--->8--->8---
Regards,
Diego