Skip to content

Refactor CRC shell detection mechanism to use process parent programatically  #4562

@rohanKanojia

Description

@rohanKanojia

Description

Originally posted by @cfergeau in #4526 (comment)

If we want to do some more extensive shell guessing by iterating over processes, could we not limit ourselves to the parents of the crc process?
I'd prefer that we extend this approach and drop the calls to an external command, and the parsing which comes with it.
In the scenario described above on macos, with pstree I get this so I can find the right terminal without relying on "latest launched"
(I'm not suggesting to use pstree directly, but to do something similar in go)

Acceptance Criteria

  • Investigate whether shell can be detected correctly using parent process approach programmatically without using any command
  • If investigation is successful , refactor current shell detection mechanism to be based on this approach.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions