Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Process.terminal() returns the path to the terminal attached to the process, if one exists. This will include most processes launched interactively, not just processes that represent sessions. This implements a new heuristic, in which a process is a session if it has a terminal attached and either somehow has no parent or its parent has a different terminal attached. This heuristic is probably not foolproof, but should be sufficient for the majority of cases.
- Loading branch information