shutdown(3)
okay so bestie, we're in the Arcan Lua API and the page is shutdown(3) β yes, manual name folded in right at the top, we love a self-referential moment πβ¨
πΈ NAME πΈ
shutdown β queue a shutdown event. That's the icon: you're asking the engine to shut down, but the request goes through the queue first π
β¨ SYNOPSIS β¨
the signature is literally:
nil
shutdown( optmsg, optcode )
π DESCRIPTION π
This function will shut down the engine and terminate the process when it's deemed safe β no cap. The important part is that it will not happen immediately; instead, an event gets queued internally so frameservers and other pending-data related tasks have time to clean up π§β¨
it's giving "graceful exit era" β the shutdown is queued, not instant, so cleanup can happen first π
The system's interpretation of optcode varies with the underlying environment, though the EXIT_SUCCESS and EXIT_FAILURE constants are propagated and useful here. There's also a special constant, EXIT_SILENT, that will return an EXIT_SUCCESS to the outer system, but only signal a 'display server lost' action to external clients, rather than asking them to shut down π
π NOTES π
- by default, the exit code corresponds to system
EXIT_SUCCESS, but it can be set to a custom value throughoptcode. π optmsgis filtered to only accept[a-Z,.0-9]and whitespace. π§
π¦ EXAMPLE π¦
first demo β shutdown0() just calls it with no args:
function shutdown0()
return shutdown();
end
π¦ EXAMPLE π¦
second demo β shutdown1() passes a message and a code:
function shutdown1()
return shutdown("giving up", -1);
end
mwah π β this page is from the system source/version, dated October 2026, and that's the footer tea, periodt. π«Ά
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms