summaryrefslogtreecommitdiff
path: root/src/user/init
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-19 09:23:48 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-19 09:23:48 +0200
commit7b466345af0d3a7dc5622617ce443a90c64e34a4 (patch)
treef276b6bf391ccfe8ec3a2cb62a7f70964249621f /src/user/init
parentac10c1a29c44b0cb29960cd0f792c7361bc430ce (diff)
downloadTCE-7b466345af0d3a7dc5622617ce443a90c64e34a4.tar.gz
TCE-7b466345af0d3a7dc5622617ce443a90c64e34a4.zip
Added ANSI support, minimal readline-like library.
Diffstat (limited to 'src/user/init')
-rw-r--r--src/user/init/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/user/init/main.c b/src/user/init/main.c
index 54dd4b6..7300efe 100644
--- a/src/user/init/main.c
+++ b/src/user/init/main.c
@@ -5,19 +5,19 @@
int main(char** args) {
int i;
- term = open("/.ui/klog", 0);
- if (term <= 0) return -1;
+ FILE home_term = open("/.ui/home", 0);
+ if (home_term < 0) return -1;
print("(init) Trivial/Computing Environment says hello. Press super to go home.\n");
for (i = 0; args[i] != 0; i++) {
if (i == 0) continue;
printf("(init) Spawning %s...\n", args[i]);
- int pid = run(args[i], 0);
+ int pid = run(args[i], 0, home_term);
if (pid < 0) {
print("(init) Error. Sorry.\n");
} else {
- waitpid(pid);
+ waitpid(pid, 1);
}
}
print("(init) Goodbye.\n");