2 * Acess2 System Init Task
11 #define DEFAULT_TERMINAL "/Devices/VTerm/0"
12 #define DEFAULT_SHELL "/Acess/SBin/login"
14 #define ARRAY_SIZE(x) ((sizeof(x))/(sizeof((x)[0])))
20 * \fn int main(int argc, char *argv[])
23 int main(int argc, char *argv[])
27 char termpath[sizeof(DEFAULT_TERMINAL)] = DEFAULT_TERMINAL;
28 char *child_argv[2] = {DEFAULT_SHELL, 0};
30 // - Parse init script
32 // - Start virtual terminals
33 for( i = 0; i < NUM_TERMS; i++ )
35 tid = clone(CLONE_VM, 0);
38 termpath[sizeof(DEFAULT_TERMINAL)-2] = '0' + i;
40 open(termpath, OPENFLAG_READ); // Stdin
41 open(termpath, OPENFLAG_WRITE); // Stdout
42 open(termpath, OPENFLAG_WRITE); // Stderr
43 execve(DEFAULT_SHELL, child_argv, NULL);
48 // TODO: Implement message watching