Skip to content

Conversation

@nbareil
Copy link
Contributor

@nbareil nbareil commented Oct 18, 2022

Usually, I am trying all my best to never use PID/PPID in favor of their GUID versions because of the PID recycling feature that regularly bites me in the weirdest way.

Unfortunately, process_tree functions require PID... but they can accept GUID if we hack a bit _pid_fmt.

proc_df['ProcessId'] = proc_df.ProcessGuid
proc_df['ParentProcessId'] = proc_df.ParentProcessGuid
p_tree_win = ptree.build_process_tree(proc_df, pid_fmt="guid")
ptree.plot_process_tree(p_tree_win)

This is totally a hack, I guess the real solution would be to accept the Guid versions as a first class citizen and you should reject this hackish PR 🤷 Sorry!

Without the patch, it errors with:

image

@ianhelle
Copy link
Contributor

Doesn't seem hacky to me. Looks good - I had a couple of minor comments.

@nbareil nbareil requested a review from ianhelle October 20, 2022 07:36
@nbareil
Copy link
Contributor Author

nbareil commented Oct 22, 2022

Hello, changes have been applied! Thanks

@ianhelle ianhelle added this to the Release 2.2.0 milestone Oct 24, 2022
@ianhelle ianhelle merged commit 5729836 into microsoft:main Oct 28, 2022
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.

2 participants