(self)
| 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': |