Skip to main content
2 of 6
added 518 characters in body
simon
  • 351
  • 1
  • 9

C++, 69 bytes

#include<os>
void Service::start(const std::string&){OS::shutdown();}

Only works in IncludeOS (v0.9.3)

Test:

$ cat service.cpp
#include<os>
void Service::start(const std::string&){OS::shutdown();}

$ make
[...]

$ qemu-system-x86_64 -drive file=Demo_Service.img,format=raw,if=ide -nographic -smp 4 -m 128 -k en-us
[...]
================================================================================
IncludeOS v0.9.3  +--> Running [ IncludeOS Demo Service ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$
simon
  • 351
  • 1
  • 9