RFR: 8234262: Unmask SIGQUIT in a child process [v3]
Roger Riggs
rriggs at openjdk.org
Fri Sep 23 15:48:05 UTC 2022
On Fri, 23 Sep 2022 03:25:49 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Move clearing of the signal mask to jspawnhelper so the launched
>> process gets a clear signal mask.
>
> test/jdk/java/lang/ProcessBuilder/UnblockSignals.java line 37:
>
>> 35: public static void main(String[] args) throws IOException, InterruptedException {
>> 36: // Check that SIGQUIT is not masked, in previous releases it was masked
>> 37: final ProcessBuilder pb = new ProcessBuilder("sleep", "30").inheritIO();
>
> SIGQUITing the child may leave a core dump. You may want to wrap the sleep in a shell call with ulimit to prevent that, e.g.
>
> `new ProcessBuilder("sh", "-c", "ulimit -c 0 && sleep 30");`
That doesn't work as intended; the `sh` is killed, not the sleep; and the core dump would be of `sh`.
The core dump of sleep will be small, I think it can be tolerated if it happens.
-------------
PR: https://git.openjdk.org/jdk/pull/10379
More information about the core-libs-dev
mailing list