Process information

An example of how to access the current process id and parent process id.

Edit on GitHub

The current process’s process id is available in the Ende.pid variable.

console.log(Ende.pid);

The parent process id is available in the Ende namespace too.

console.log(Ende.ppid);

Run this example locally using the Ende CLI:

ende run https://docs.ende.sh/examples/scripts/pid.ts