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

13
LINES

< > BotCompany Repo | #1001331 // killProgramID

JavaX fragment (include)

static boolean killProgramID(S idToKill) {
  print("Killing program " + idToKill);
  boolean killedAnything = false;
  for (ProgramScan.Program p : quickBotScan()) {
    if (p.helloString.startsWith("This is a JavaX VM")
      && isVMRunningProgram(p.port, idToKill)) {
      print("Killing port " + p.port + " (program id: " + idToKill + ")");
      killPortAndWait(p.port);
      killedAnything = true;
    }
  }
  return killedAnything;
}

Author comment

Began life as a copy of #1001330

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

Comments [hide]

ID Author/Program Comment Date
1130 stefan TODO: kill a program in a multi-program vm 2015-10-17 15:06:59

add comment

Snippet ID: #1001331
Snippet name: killProgramID
Eternal ID of this version: #1001331/1
Text MD5: f0d834bd5339675a37abb4f9948da24a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-10-17 15:13:08
Source code size: 453 bytes / 13 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 810 / 1119
Referenced in: [show references]