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

Add Process.Parent() #46

Merged
merged 5 commits into from
Apr 11, 2019
Merged

Add Process.Parent() #46

merged 5 commits into from
Apr 11, 2019

Conversation

cwurm
Copy link

@cwurm cwurm commented Apr 10, 2019

Adds a Parent() method to Process and implements it for all platforms. This should make it easier for users of this library to traverse the process tree.

Two other minor changes:

  1. Caches the result of Info() on Darwin. We already do this for Linux and Windows, and now that Parent() is calling Info() as well it makes even more sense to cache.
  2. Adds a build constraint to providers/linux/os_test.go - unlike many other test files that contain _linux in their names and are thus excluded, this one had been running on Windows as well. At least on my Windows Vagrant machine go test ./... failed because of it.

@cwurm cwurm added the review label Apr 10, 2019
@cwurm cwurm requested a review from andrewkroh April 10, 2019 17:00
Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

providers/linux/os_test.go Outdated Show resolved Hide resolved
@cwurm cwurm merged commit fd25fda into elastic:master Apr 11, 2019
@cwurm cwurm deleted the process_parent branch April 11, 2019 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants