Title: Graceful forced exit? · Issue #9944 · ipython/ipython · GitHub
Open Graph Title: Graceful forced exit? · Issue #9944 · ipython/ipython
X Title: Graceful forced exit? · Issue #9944 · ipython/ipython
Description: Is there a way for an application to signal to ipython that it should exit gracefully? My use case is installing a signal handler to force IPython to exit. I would like something like this to work: In [1]: import sys, signal In [2]: def ...
Open Graph Description: Is there a way for an application to signal to ipython that it should exit gracefully? My use case is installing a signal handler to force IPython to exit. I would like something like this to work:...
X Description: Is there a way for an application to signal to ipython that it should exit gracefully? My use case is installing a signal handler to force IPython to exit. I would like something like this to work:...
Opengraph URL: https://github.com/ipython/ipython/issues/9944
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Graceful forced exit?","articleBody":"Is there a way for an **application** to signal to `ipython` that it should exit gracefully? My use case is installing a signal handler to force IPython to exit.\n\nI would like something like this to work:\n\n```\nIn [1]: import sys, signal\n\nIn [2]: def exit_now(*args): sys.exit()\n\nIn [3]: signal.signal(signal.SIGALRM, exit_now)\nOut[3]: 0\n\nIn [4]: signal.alarm(2)\nOut[4]: 0\n\nIn [5]:\n```\n\nIt used to be that forcing an EOF on stdin would work, but `prompt_toolkit` does not handle that correctly anymore. See also https://github.com/jonathanslenders/python-prompt-toolkit/issues/392\n","author":{"url":"https://github.com/jdemeyer","@type":"Person","name":"jdemeyer"},"datePublished":"2016-09-13T08:38:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":18},"url":"https://github.com/9944/ipython/issues/9944"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:007e3eb9-e56b-7978-e1c1-055239cd57ef |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABA0:115683:F6AA50:14B620A:6A4C673A |
| html-safe-nonce | fb45113d3d6fc9e8b5a2eafe669956baa72a9dffda06ec5fb4e89d671c713a19 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkEwOjExNTY4MzpGNkFBNTA6MTRCNjIwQTo2QTRDNjczQSIsInZpc2l0b3JfaWQiOiI2MjU1NTAxMDMwOTU3Mjc5MDM0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3bb1364ef7088ed61b10c62c5b898ec981dd0b9958df438afad1f51395f1a4ab |
| hovercard-subject-tag | issue:176582526 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ipython/ipython/9944/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e5cd59255b7af10f2bf25852593a9041b50ae62c9e1ae3d940d7f941bd4115ac/ipython/ipython/issues/9944 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e5cd59255b7af10f2bf25852593a9041b50ae62c9e1ae3d940d7f941bd4115ac/ipython/ipython/issues/9944 |
| og:image:alt | Is there a way for an application to signal to ipython that it should exit gracefully? My use case is installing a signal handler to force IPython to exit. I would like something like this to work:... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jdemeyer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/ipython/ipython git https://github.com/ipython/ipython.git |
| octolytics-dimension-user_id | 230453 |
| octolytics-dimension-user_login | ipython |
| octolytics-dimension-repository_id | 658518 |
| octolytics-dimension-repository_nwo | ipython/ipython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 658518 |
| octolytics-dimension-repository_network_root_nwo | ipython/ipython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 14099438da5379150f15a2892474c7c7e6c0e55e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width