mirror of
https://github.com/sigmasternchen/Wish
synced 2025-03-15 15:38:54 +00:00
fix init start order (wait)
This commit is contained in:
parent
4def995db4
commit
2b9d01c927
2 changed files with 5 additions and 3 deletions
|
@ -78,7 +78,7 @@ Kernel.machine = function() {
|
||||||
Kernel.msgSuccess(true);
|
Kernel.msgSuccess(true);
|
||||||
Kernel.msgOut(" creating class instance", true);
|
Kernel.msgOut(" creating class instance", true);
|
||||||
var init = new InitClass();
|
var init = new InitClass();
|
||||||
init.init(1);
|
init.init(0);
|
||||||
Kernel.msgOut(" adding handler for stdio on /dev/tty1", true);
|
Kernel.msgOut(" adding handler for stdio on /dev/tty1", true);
|
||||||
init.files['stdin'] = Kernel.Filesystem.getFile("/dev/tty1/i");
|
init.files['stdin'] = Kernel.Filesystem.getFile("/dev/tty1/i");
|
||||||
init.files['stdout'] = Kernel.Filesystem.getFile("/dev/tty1/o");
|
init.files['stdout'] = Kernel.Filesystem.getFile("/dev/tty1/o");
|
||||||
|
@ -206,7 +206,7 @@ Kernel.ProcessManager.init = function() {
|
||||||
}
|
}
|
||||||
Kernel.ProcessManager.add = function(process) {
|
Kernel.ProcessManager.add = function(process) {
|
||||||
this.processList[process.pid] = process;
|
this.processList[process.pid] = process;
|
||||||
if (process.pid != process.parentId)
|
if (process.parentId != 0)
|
||||||
this.processList[process.parentId].signalHandler(SIGCHLD);
|
this.processList[process.parentId].signalHandler(SIGCHLD);
|
||||||
}
|
}
|
||||||
Kernel.ProcessManager.quit = function(process) {
|
Kernel.ProcessManager.quit = function(process) {
|
||||||
|
|
|
@ -55,6 +55,7 @@ InitClass.prototype.tick = function() {
|
||||||
} else {
|
} else {
|
||||||
this.execProgram();
|
this.execProgram();
|
||||||
this.Start.index++;
|
this.Start.index++;
|
||||||
|
this.state = 31;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
|
@ -139,7 +140,8 @@ InitClass.prototype.execProgram = function() {
|
||||||
s += " } catch (exception) {";
|
s += " } catch (exception) {";
|
||||||
s += " console.log(\"Prozess \" + prog.pid + \": \");";
|
s += " console.log(\"Prozess \" + prog.pid + \": \");";
|
||||||
s += " console.dir(exception);";
|
s += " console.dir(exception);";
|
||||||
s += " }";
|
s += " }";
|
||||||
|
s += " Kernel.ProcessManager.processList[1].state = 4;";
|
||||||
s += "}";
|
s += "}";
|
||||||
eval(s);
|
eval(s);
|
||||||
Kernel.ProcessManager.load(name, func);
|
Kernel.ProcessManager.load(name, func);
|
||||||
|
|
Loading…
Reference in a new issue