Process
Defined in: src/process.ts:40
A process, basically the same as struct task_struct
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Process(
init?):Process
Defined in: src/process.ts:87
Parameters
Section titled “Parameters”ProcessInit = {}
Returns
Section titled “Returns”Process
Properties
Section titled “Properties”argv:
string[]
Defined in: src/process.ts:49
children
Section titled “children”
readonlychildren:Set<Process>
Defined in: src/process.ts:47
optionalcode?:number
Defined in: src/process.ts:59
What the process stopped with, once it has.
context
Section titled “context”
readonlycontext:FSContext
Defined in: src/process.ts:42
The context this process runs in. Its id is the pid.
env:
Record<string,string> ={}
Defined in: src/process.ts:50
optionalexe?:string
Defined in: src/process.ts:56
The path of the program currently loaded
killed_by?
Section titled “killed_by?”
optionalkilled_by?:Signal
Defined in: src/process.ts:62
The signal that killed the process, if one did
parent?
Section titled “parent?”
optionalparent?:Process
Defined in: src/process.ts:45
Whatever forked this process, or whatever adopted it once that exited.
sigHandlers
Section titled “sigHandlers”
readonlysigHandlers:Map<Signal,Set<SignalHandler>>
Defined in: src/process.ts:71
What the process has asked to be told about, like struct sighand_struct.
A signal with nothing here gets its default_action.
stopped
Section titled “stopped”stopped:
boolean=false
Defined in: src/process.ts:65
Whether a job control signal has stopped the process, like JOBCTL_STOPPED
readonlytty:TTY|null
Defined in: src/process.ts:53
The controlling terminal
staticexit:any
Defined in: src/process.ts:211
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get comm():
string
Defined in: src/process.ts:83
The name of the program without its path.
Returns
Section titled “Returns”string
Get Signature
Section titled “Get Signature”get cwd():
string
Defined in: src/process.ts:112
Returns
Section titled “Returns”string
Get Signature
Section titled “Get Signature”get pid():
number
Defined in: src/process.ts:74
A pid is the id of the process’ context.
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get ppid():
number
Defined in: src/process.ts:78
Returns
Section titled “Returns”number
Methods
Section titled “Methods”[dispose]()
Section titled “[dispose]()”[dispose]():
void
Defined in: src/process.ts:207
Returns
Section titled “Returns”void
chdir()
Section titled “chdir()”chdir(
directory):void
Defined in: src/process.ts:116
Parameters
Section titled “Parameters”directory
Section titled “directory”string
Returns
Section titled “Returns”void
dispose()
Section titled “dispose()”dispose():
void
Defined in: src/process.ts:179
Release everything the process was holding and drop it from the table
Returns
Section titled “Returns”void
kill()
Section titled “kill()”kill(
signal):boolean
Defined in: src/process.ts:144
Send a signal to the process
Parameters
Section titled “Parameters”signal
Section titled “signal”Returns
Section titled “Returns”boolean
sig_action()
Section titled “sig_action()”sig_action(
signal,handler):void
Defined in: src/process.ts:124
Ask to be told when a signal arrives, like sigaction with a handler.
Parameters
Section titled “Parameters”signal
Section titled “signal”handler
Section titled “handler”Returns
Section titled “Returns”void
sig_default()
Section titled “sig_default()”sig_default(
signal,handler?):void
Defined in: src/process.ts:137
Stop listening for a signal, like going back to SIG_DFL.
Without a handler every one installed for the signal is taken off.
Parameters
Section titled “Parameters”signal
Section titled “signal”handler?
Section titled “handler?”Returns
Section titled “Returns”void