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

Remove exitVM permissions #10963

Merged
merged 3 commits into from May 4, 2015
Merged

Remove exitVM permissions #10963

merged 3 commits into from May 4, 2015

Conversation

rmuir
Copy link
Contributor

@rmuir rmuir commented May 4, 2015

The tricky part here is just the windows handler for closing the console.

But its not so bad if we just have that handler properly shut down the instance instead of doing System.exit.

There is also some general refactoring to Bootstrap. I'm sorry to mix this in, but it was too hard to reason about otherwise for me :)

Tested on linux, mac, and windows. also tested closing windows console worked.

keepAliveLatch.countDown();
private void stop() {
try {
if (node != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we just use IOUtils.close here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't make bootstrap Closeable because i didnt want close to be a public method. The class must be public so its main method can be run, but otherwise a lot of this stuff is still crazy. like even the static INSTANCE would be great to eliminate.

We could factor out the java code to be different... I can do it here if we really need but I would love to defer that.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean to close node and safe the conditional... but it's Releasable so you can use Releasables.close()

@s1monw
Copy link
Contributor

s1monw commented May 4, 2015

left one minor comment... LGTM otherwise

rmuir added a commit that referenced this pull request May 4, 2015
@rmuir rmuir merged commit a0be201 into elastic:master May 4, 2015
@kevinkluge kevinkluge removed the review label May 4, 2015
@clintongormley clintongormley added >enhancement :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts labels Jun 8, 2015
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts >enhancement Team:Delivery Meta label for Delivery team v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants