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 pid file to Environment #10986

Merged
merged 1 commit into from May 5, 2015

Conversation

@tlrx
Copy link
Member

commented May 5, 2015

This commit adds the path of the PID file to the Environment. It also add it to the Security Manager since the PID file is deleted by a shutdown hook when the JVM is exited.

@tlrx

This comment has been minimized.

Copy link
Member Author

commented May 5, 2015

@rmuir Can you have a look please? I spotted it when testing #10725. Thanks

@rmuir

This comment has been minimized.

Copy link
Contributor

commented May 5, 2015

Hey this is great. is there anyway we coudl add a unit test in SecurityTests? (just create a fake pid file in tests temp dir like the other tests and assert it has permissions)

@tlrx

This comment has been minimized.

Copy link
Member Author

commented May 5, 2015

@rmuir I updated the code after your last comment

@rmuir

This comment has been minimized.

Copy link
Contributor

commented May 5, 2015

Looks good. When pushing, can we add a small javadoc for the Environment.pidFile() that mentions it returns null if no pid file is configured? Other paths do not return null, but here callers need to check.

This commit adds the path of the PID file to the Environment. It also add it to the Security Manager since the PID file is deleted by a shutdown hook when the JVM is exited.
@tlrx tlrx force-pushed the tlrx:add-pidfile-to-environment branch from 79869c8 to 3976724 May 5, 2015
@tlrx tlrx merged commit 3976724 into elastic:master May 5, 2015
1 check passed
1 check passed
CLA Commit author is a member of Elasticsearch
Details
@kevinkluge kevinkluge removed the review label May 5, 2015
@tlrx tlrx deleted the tlrx:add-pidfile-to-environment branch Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.