C++, 51 40 bytes
-11 bytes thanks to IngveIngve!
#include<os>
int main(){OS::shutdown();}
Only works in IncludeOS (v0.10.0-rc.1)
Test:
$ pwd
/home/simon/IncludeOS/examples/demo_service
$ cat service.cpp
#include<os>
int main(){OS::shutdown();}
$ mkdir build && cd build && cmake .. && make && cd ..
[...]
$ boot build/IncludeOS_example
[...]
================================================================================
================================================================================
IncludeOS v0.10.0-rc.1-9-g151a2b9
+--> Running [ IncludeOS minimal example ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$