Files
MontaukOS/programs/src/shutdown/main.cpp
T

16 lines
416 B
C++

/*
* main.cpp
* shutdown - Shut down the system
* Copyright (c) 2025-2026 Daniel Hammer
*/
#include <montauk/syscall.h>
extern "C" void _start() {
montauk::print("Shutting down...\n");
// This low-level utility bypasses the login graceful-shutdown view, so flush
// pending writes and unmount disk-backed volumes here before powering off.
montauk::fs_sync();
montauk::shutdown();
}