Terminate the script with the provided PID.
Signature:
kill(pid: number): boolean;|
Parameter |
Type |
Description |
|---|---|---|
|
pid |
number |
The PID of the script to kill. |
Returns:
boolean
True if the script is successfully killed, and false otherwise.
RAM cost: 0.5 GB
Kills the script with the provided PID. PIDs are unique across all hosts. To instead kill a script using its filename, host, and args, see the other ns.kill entry.
// kills the script with PID 20:
ns.kill(20);