added bin: lsps
This commit is contained in:
21
src/bin/LSPS.hx
Normal file
21
src/bin/LSPS.hx
Normal file
@@ -0,0 +1,21 @@
|
||||
package bin;
|
||||
|
||||
import kernel.ps.ProcessManager;
|
||||
import kernel.ps.ProcessHandle;
|
||||
import kernel.ps.Process;
|
||||
|
||||
class LSPS implements Process {
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user