Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

21
LINES

< > BotCompany Repo | #1009584 // Kill all instances of pocketsphinx

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (2306L/17K/56K).

1  
!7
2  
3  
p {
4  
  Map<Int, S> procs = psPidsAndCommands();
5  
  Map<Int, S> p2 = filterMap(procs, func(Int i, S cmd) { cic(cmd, "pocketsphinx") });
6  
  for (Int pid : keys(p2))
7  
    print(pid + ": " + procs.get(pid));
8  
  if (empty(p2)) { print("No pocketsphinx processes found"); ret; }
9  
  
10  
  print("Press enter to kill processes: " + struct(p2));
11  
  focusConsole(); readLine();
12  
  
13  
  unix_killProcesses(keys(p2));
14  
  
15  
  sleepSeconds(1);
16  
  procs = psPidsAndCommands();
17  
  p2 = filterMap(procs, func(Int i, S cmd) { cic(cmd, "pocketsphinx") });
18  
  print(n(p2, "process") + " remaining");
19  
  for (Int pid : keys(p2))
20  
    print(pid + ": " + procs.get(pid));
21  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1009584
Snippet name: Kill all instances of pocketsphinx
Eternal ID of this version: #1009584/14
Text MD5: e39fc2d34e7ac4def99f880a00f4190c
Transpilation MD5: f73993bb6bf84ead4847c5d91c8b9503
Author: stefan
Category: javax / unix
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-08 21:31:06
Source code size: 654 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 539 / 694
Version history: 13 change(s)
Referenced in: [show references]