You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "dongjoon-hyun (via GitHub)" <gi...@apache.org> on 2026/09/22 22:11:52 UTC
[PR] [SPARK-52816][CORE][SQL] Remove direct usage of `sun.misc.Signal` [spark]
dongjoon-hyun opened a new pull request, #58980:
URL: https://github.com/apache/spark/pull/58980
### What changes were proposed in this pull request?
This PR aims to remove the direct usage of `sun.misc.Signal` from `SparkSQLCLIDriver` so that `SignalUtils` becomes the single place that uses `sun.misc.Signal`.
- Add `SignalUtils.withSignalHandler(signal)(handler)(body)`. It installs `handler` for the given signal only while `body` runs, then restores the previous handler. Unlike `SignalUtils.register`, which adds actions to a permanent chain of handlers, it replaces the existing handler for that time.
- Update `SparkSQLCLIDriver.processLine` to use the new helper instead of calling `sun.misc.Signal.handle` directly.
### Why are the changes needed?
JDK has no public replacement for `sun.misc.Signal`; it remains in the `jdk.unsupported` module as a critical internal API (JEP 260). Keeping all of its usage in one utility class isolates this unsupported API. If JDK adds a public alternative later, only `SignalUtils` will need to change.
### Does this PR introduce _any_ user-facing change?
No. The Ctrl+C behavior of the Spark SQL CLI is unchanged:
- The first Ctrl+C interrupts the running statement.
- A second Ctrl+C exits the JVM.
- The previous handler is restored after each line is processed.
### How was this patch tested?
Pass the CIs with the existing `CliSuite`.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 5.5
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-52816][CORE][SQL] Remove direct usage of `sun.misc.Signal` [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #58980:
URL: https://github.com/apache/spark/pull/58980#issuecomment-5790484329
**Merge Summary:**
- merged into master https://github.com/apache/spark/commit/30dc3dc8d20c6db77b5ccf4f058126f793bf812c
- merged into branch-4.x https://github.com/apache/spark/commit/3b6dc91b3c3f9089c4fdb5f4a015e06aba87abdc
*Posted by `merge_spark_pr.py`*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-52816][CORE][SQL] Remove direct usage of `sun.misc.Signal` [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #58980:
URL: https://github.com/apache/spark/pull/58980#issuecomment-5789053567
The linter failure is irrelevant and is fixed already in `master` branch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-52816][CORE][SQL] Remove direct usage of `sun.misc.Signal` [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #58980:
URL: https://github.com/apache/spark/pull/58980#issuecomment-5790475661
Thank you, @HyukjinKwon !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-52816][CORE][SQL] Remove direct usage of `sun.misc.Signal` [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #58980: [SPARK-52816][CORE][SQL] Remove direct usage of `sun.misc.Signal`
URL: https://github.com/apache/spark/pull/58980
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org