#include #include int main(char **args) { FILE home_term = open("/.ui/home", 0); int i, pid; if (home_term < 0) return -1; printf("(init) Trivial/Computing Environment says hello. Press super to go home.\n"); for (i = 0; args[i]; i++) { if (i == 0) continue; printf("(init) Spawning %s...\n", args[i]); pid = run(args[i], 0, home_term); if (pid < 0) { printf("(init) Error. Sorry.\n"); } else { waitpid(pid, 1); } } printf("(init) Goodbye.\n"); return 0; }