MCPcopy
hub / github.com/brightio/penelope / get_shell_pid

Method get_shell_pid

penelope.py:2389–2399  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2387 self.tty = self.get_tty(silent=silent)
2388
2389 def get_shell_pid(self):
2390 if self.OS == 'Unix':
2391 response = self.exec("echo $$", agent_typing=True, value=True)
2392
2393 elif self.OS == 'Windows':
2394 return None
2395
2396 if not (isinstance(response, str) and response.isnumeric()):
2397 logger.error(f"Cannot get the PID of the shell...")
2398 return False
2399 return response
2400
2401 def get_user(self):
2402 if self.OS == 'Unix':

Callers 1

get_shell_infoMethod · 0.95

Calls 1

execMethod · 0.95

Tested by

no test coverage detected