diff --git a/clite/core.js b/clite/core.js index 10885f8..fbf04e9 100644 --- a/clite/core.js +++ b/clite/core.js @@ -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);