Skip to content

Process

Defined in: src/process.ts:40

A process, basically the same as struct task_struct

new Process(init?): Process

Defined in: src/process.ts:87

ProcessInit = {}

Process

argv: string[]

Defined in: src/process.ts:49


readonly children: Set<Process>

Defined in: src/process.ts:47


optional code?: number

Defined in: src/process.ts:59

What the process stopped with, once it has.


readonly context: 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


optional exe?: string

Defined in: src/process.ts:56

The path of the program currently loaded


optional killed_by?: Signal

Defined in: src/process.ts:62

The signal that killed the process, if one did


optional parent?: Process

Defined in: src/process.ts:45

Whatever forked this process, or whatever adopted it once that exited.


readonly sigHandlers: 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: boolean = false

Defined in: src/process.ts:65

Whether a job control signal has stopped the process, like JOBCTL_STOPPED


readonly tty: TTY | null

Defined in: src/process.ts:53

The controlling terminal


static exit: any

Defined in: src/process.ts:211

get comm(): string

Defined in: src/process.ts:83

The name of the program without its path.

string


get cwd(): string

Defined in: src/process.ts:112

string


get pid(): number

Defined in: src/process.ts:74

A pid is the id of the process’ context.

number


get ppid(): number

Defined in: src/process.ts:78

number

[dispose](): void

Defined in: src/process.ts:207

void


chdir(directory): void

Defined in: src/process.ts:116

string

void


dispose(): void

Defined in: src/process.ts:179

Release everything the process was holding and drop it from the table

void


kill(signal): boolean

Defined in: src/process.ts:144

Send a signal to the process

SignalLike

boolean


sig_action(signal, handler): void

Defined in: src/process.ts:124

Ask to be told when a signal arrives, like sigaction with a handler.

SignalLike

SignalHandler

void


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.

SignalLike

SignalHandler

void