mirror of
https://codeberg.org/TicklishHoneyBee/CLIte.git
synced 2026-03-11 09:04:37 +00:00
some tweaks to exec and process manager
This commit is contained in:
parent
7071a63dfa
commit
a93576a832
1 changed files with 4 additions and 3 deletions
|
|
@ -652,7 +652,7 @@ clite.proc = {
|
|||
gpid:mapCPID(cpid), // the group pid (parent process id) of this process
|
||||
pid:data.nextid++, // the pid (process id) of this process
|
||||
ctty:0, // the id of the controlling tty for this process
|
||||
func:fn, // the function this process executes
|
||||
obj:fn, // the function this process executes
|
||||
waits:[] // array of wait() calls pending for this process on exit
|
||||
});
|
||||
var parent = getProc(proc.gpid);
|
||||
|
|
@ -669,13 +669,14 @@ clite.proc = {
|
|||
n.data.content = 'pid: '+proc.pid+'\n';
|
||||
return proc.pid;
|
||||
}
|
||||
clite.proc.update = function(pid,cl) {
|
||||
clite.proc.update = function(pid,cl,obj) {
|
||||
var proc = getProc(pid);
|
||||
if (!proc)
|
||||
return false;
|
||||
var n = vfsapi.getNode(0,'/proc/'+proc.pid);
|
||||
if (!n)
|
||||
return false;
|
||||
proc.obj = obj;
|
||||
n.data.content += 'command: '+cl+'\n';
|
||||
return true;
|
||||
}
|
||||
|
|
@ -3557,7 +3558,7 @@ clite.lib = {
|
|||
return null;
|
||||
}
|
||||
|
||||
clite.proc.update(io.pid,args.join(' '));
|
||||
clite.proc.update(io.pid,args.join(' '),fd.node.data.content);
|
||||
|
||||
var r = clite.core.execSafe(function() {
|
||||
var rr = fd.node.data.content(args,env,io);
|
||||
|
|
|
|||
Loading…
Reference in a new issue