diff options
author | Conrad Pankoff <deoxxa@fknsrs.biz> | 2019-08-12 21:24:11 +1000 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-08-12 13:52:20 +0200 |
commit | 67a4256a983e38e11e628595818ab847f0e4c8c2 (patch) | |
tree | 1853d1bb6058386c79387d7210770c92a2dcdcea /Servers/TTYServer/main.cpp | |
parent | 072bf8cbb9f573288b1f001c4e95357018b50a51 (diff) | |
download | serenity-67a4256a983e38e11e628595818ab847f0e4c8c2.zip |
Server: Add TTYServer, a rudimentary text console manager
This should probably call out to a login program at some point. Right now
it just puts a root terminal on tty{1,2,3}.
Remember not to leave your Serenity workstation unattended!
Diffstat (limited to 'Servers/TTYServer/main.cpp')
-rw-r--r-- | Servers/TTYServer/main.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Servers/TTYServer/main.cpp b/Servers/TTYServer/main.cpp new file mode 100644 index 0000000000..f16c226c6d --- /dev/null +++ b/Servers/TTYServer/main.cpp @@ -0,0 +1,16 @@ +#include <stdio.h> +#include <stdlib.h> + +int main(int argc, char** argv) +{ + if (argc < 2) + return -1; + + dbgprintf("Starting console server on %s\n", argv[1]); + + while (true) { + dbgprintf("Running shell on %s\n", argv[1]); + int rc = system("/bin/Shell"); + dbgprintf("Shell on %s exited with code %d\n", argv[1], rc); + } +} |