1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:07:34 +00:00

Kernel: Ensure only user processes are terminated properly in shutdown

This patch ensures that the shutdown procedure can complete due to the
fact we don't kill kernel processes anymore, and only stop the scheduler
from running after the filesystems unmount procedure.

We also need kernel processes during the shutdown procedure, because we
rely on the WorkQueue threads to run WorkQueue items to complete async
IO requests initiated by filesystem sync & unmounting, etc.

This is also simplifying the code around the killing processes, because
we don't need to worry about edge cases such as the FinalizerTask
anymore.
This commit is contained in:
Liav A 2023-08-19 19:07:17 +03:00 committed by Andrew Kaster
parent 7082a1f0c4
commit b81b2c3fe7
2 changed files with 21 additions and 22 deletions

View file

@ -32,11 +32,7 @@ private:
static ErrorOr<void> perform_reboot();
static ErrorOr<void> perform_shutdown();
enum class ProcessKind {
User,
Kernel,
};
static ErrorOr<void> kill_processes(ProcessKind, ProcessID finalizer_pid);
static ErrorOr<void> kill_all_user_processes();
};
}