Files
cc-haxe/src/bin/LSPS.hx

23 lines
439 B
Haxe

package bin;
import kernel.ps.ProcessManager;
import kernel.ps.ProcessHandle;
import kernel.ps.IProcess;
@:build(macros.Binstore.includeBin("LSPS", ["lsps"]))
class LSPS implements IProcess {
public function new() {}
public function run(handle:ProcessHandle) {
var pids = ProcessManager.listProcesses();
handle.writeLine('Count: ${pids.length}');
for (pid in pids) {
handle.writeLine('${pid}');
}
handle.close();
}
}