mirror of
https://github.com/sigmasternchen/Wish
synced 2025-03-15 07:28:56 +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.msgOut(" creating class instance", true);
|
||||
var init = new InitClass();
|
||||
init.init(1);
|
||||
init.init(0);
|
||||
Kernel.msgOut(" adding handler for stdio on /dev/tty1", true);
|
||||
init.files['stdin'] = Kernel.Filesystem.getFile("/dev/tty1/i");
|
||||
init.files['stdout'] = Kernel.Filesystem.getFile("/dev/tty1/o");
|
||||
|
@ -206,7 +206,7 @@ Kernel.ProcessManager.init = function() {
|
|||
}
|
||||
Kernel.ProcessManager.add = function(process) {
|
||||
this.processList[process.pid] = process;
|
||||
if (process.pid != process.parentId)
|
||||
if (process.parentId != 0)
|
||||
this.processList[process.parentId].signalHandler(SIGCHLD);
|
||||
}
|
||||
Kernel.ProcessManager.quit = function(process) {
|
||||
|
|
|
@ -55,6 +55,7 @@ InitClass.prototype.tick = function() {
|
|||
} else {
|
||||
this.execProgram();
|
||||
this.Start.index++;
|
||||
this.state = 31;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
|
@ -139,7 +140,8 @@ InitClass.prototype.execProgram = function() {
|
|||
s += " } catch (exception) {";
|
||||
s += " console.log(\"Prozess \" + prog.pid + \": \");";
|
||||
s += " console.dir(exception);";
|
||||
s += " }";
|
||||
s += " }";
|
||||
s += " Kernel.ProcessManager.processList[1].state = 4;";
|
||||
s += "}";
|
||||
eval(s);
|
||||
Kernel.ProcessManager.load(name, func);
|
||||
|
|
Loading…
Reference in a new issue