-
Notifications
You must be signed in to change notification settings - Fork 44
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
Oracle client overrides signals #37
Comments
This is same issue with oracle/node-oracledb#128 and https://stackoverflow.com/questions/41811197/php-oci-connection-ignores-sigint-ctrl-c. It doesn't depend on whether privilege is set or not. It depends on whether the connection is established successfully or not. I bet that This issue will be fixed by replacing the SIGINT signal handler. Add the followings to [dependencies]
ctrlc = "3.0"
libc = "0.2" Then add the following code to ctrlc::set_handler(|| unsafe {
libc::raise(libc::SIGTERM); // send SIGTERM instead of SIGINT to stop the process.
})
.expect("Error setting Ctrl-C handler"); |
You're right, of course the connection couldn't succeed with So if I understand correctly, the issue lies in the instant client lib? or ODPI? I'll try to override the handlers and report back here. Thanks! |
In the client library. ODPI and rust-oracle don't change signal handlers. |
Thanks for the kind support. After some digging, I found the following note (an Oracle account is required):
The solution is to add a parameter to
Is it worth a note in the |
Thanks for the information. I didn't know that. I'll add a document about it. However I'll guide this link instead of the solution. That's because "My Oracle Support TERMS OF USE" includes "Except as specifically provided in your agreement with Oracle, the Materials may not be used to provide services for or to third parties and may not be shared with or accessed by third parties." |
Hi,
Environment:
When setting privileges, CTRL-C doesn't work anymore.
Reproducible example:
I'm not exactly sure why, but the signals handlers are setup differently.
Below is the output of
strace -e rt_sigaction,rt_sigprocmask ./target/release/main 2>&1 | grep INT
no privileges - does work
privileges - does not work
Any idea?
The text was updated successfully, but these errors were encountered: