Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort tree output by PPID #171

Merged
merged 1 commit into from
Jun 24, 2022
Merged

Sort tree output by PPID #171

merged 1 commit into from
Jun 24, 2022

Conversation

tklauser
Copy link
Collaborator

Otherwise the processes might appear in arbitrary order and
disassociated from their parent process. Also avoid printing a stray
newline after the tree.

Before:

...
├── 2493
│   └── 4952 (gops) {go1.18.1}
├── 1
│   └── 117 (com.docker.vmnetd) {go1.17.5}
├── 4405
│   └── 4416 (gopls) {go1.18.2}
└── 4404

After:

...
├── 1
│   └── 117 (com.docker.vmnetd) {go1.17.5}
├── 2493
│   └── 4945 (gops) {go1.18.3}
└── 4404
    └── 4405 (gopls) {go1.18.2}
        └── 4416 (gopls) {go1.18.2}

@tklauser tklauser requested a review from odeke-em June 24, 2022 07:46
Otherwise the processes might appear in arbitrary order and
disassociated from their parent process. Also avoid printing a stray
newline after the tree.

Before:

```
...
├── 2493
│   └── 4952 (gops) {go1.18.1}
├── 1
│   └── 117 (com.docker.vmnetd) {go1.17.5}
├── 4405
│   └── 4416 (gopls) {go1.18.2}
└── 4404

```

After:

```
...
├── 1
│   └── 117 (com.docker.vmnetd) {go1.17.5}
├── 2493
│   └── 4945 (gops) {go1.18.3}
└── 4404
    └── 4405 (gopls) {go1.18.2}
        └── 4416 (gopls) {go1.18.2}
```
@tklauser tklauser merged commit bf851ab into master Jun 24, 2022
@tklauser tklauser deleted the tree-sort-ppid branch June 24, 2022 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants