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

Conditionalize onExit / signal handling #8

Open
movitto opened this issue May 29, 2020 · 0 comments
Open

Conditionalize onExit / signal handling #8

movitto opened this issue May 29, 2020 · 0 comments

Comments

@movitto
Copy link

movitto commented May 29, 2020

Greetings! Thanks for this great library, we've incorporated it into a fork of the 'jsonpath' library where we swapped the unsafe static-eval backend w/ v8-sandbox to safely process arbitrary user-specified expression.

In the application which uses jsonpath-sandbox we capture process-terminating signals and gracefully shutdown operations, restoring data to a consistent state before terminating. Part of this invokes the v8-sandbox shutdown method to cleanup operations here. The problem is that v8-sandbox utilizes the onExit function in the signal-exit module to catch error / exceptions on its own and invokes shutdown locally. Thus if the client process receives a signal while processing expressions that operation will not have the chance to gracefully terminate, handle the results and data could enter an inconsistent state.

Would it be possible to add a Sandbox constructor option to skip over the 'onExit' call and disable internal signal handling? If this is acceptable and it's just a matter of implementing it I'd be happy to send a PR.

Thank you for your consideration

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

No branches or pull requests

1 participant