Skip to content

Add ability for Kernel Gateway to ignore SIGHUP signal #304

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

Closed
wants to merge 2 commits into from

Conversation

tf3193
Copy link

@tf3193 tf3193 commented Sep 17, 2018

We noticed that when having kernel gateway run for extended periods of time the process would terminate when the user would logoff or if we killed the terminal that started the Kernel Gateway. We found out that python 3.x will not ignore the SIGHUP signal even when ran with nohup, this lead us to this solution.

Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

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

Interesting. Yeah, I can run JKG (well, Enterprise Gateway) forever, logging out, etc., but I'm primarily running on python 2. Thank you for this contribution.

My one suggestion is that we make this unconditional and remove the configuration hooks. JKG and EG are essentially services and should ignore SIGHUP (IMHO). Do you see an issue with that or were you not wanting to disrupt current behaviors?

My other (more selfish) reason is that we're going to introduce "session persistence" to Enterprise Gateway and would like to avoid overuse of that term in the options.

If you feel strongly about making this optional, then perhaps we could change the name to something like KG_IGNORE_HANGUP and make it default to True.

We'll want something similar in Enterprise Gateway since this is one of the methods we don't inherit.

@tf3193
Copy link
Author

tf3193 commented Sep 17, 2018

Thanks for the reply Kevin. I see no issue with making it a default behavior, I was just trying to preserve default behavior and be non intrusive to current users. If you would like I can remove the config hooks.

@kevin-bates
Copy link
Member

Awesome - yeah, let's just make it unconditional. I'll wait until tomorrow to merge for others to comment.

Would you mind applying this to the Enterprise Gateway project? You'll find it familiar. 😄

@tf3193
Copy link
Author

tf3193 commented Sep 17, 2018

All done Kevin!
Sure I will open up a pull request on Enterprise Gateway as well!

Thank you

Copy link
Contributor

@rolweber rolweber left a comment

Choose a reason for hiding this comment

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

lgtm

@kevin-bates
Copy link
Member

@tf3193 - thank you for the contribution.
@rolweber - thank you for your review.

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.

3 participants