[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    Re: RFR: JDK-8274320: os::fork_and_exec() should be using posix_spawn
From:       David Holmes <dholmes () openjdk ! java ! net>
Date:       2021-10-31 22:09:12
Message-ID: HFDGFojyONBROcnuJ6ch58t-DfHxmc2p99vXWdH9drc=.7a6461b6-f2f0-4366-b951-1d80967dc381 () github ! com
[Download RAW message or body]

On Sat, 25 Sep 2021 16:16:29 GMT, Thomas Stuefe <stuefe@openjdk.org> wrote:

> Hi, may I have reviews for this small patch please?
> 
> `os::fork_and_exec()`, used in the hotspot to spawn child programs (scripts etc) in \
> error situations, should be using `posix_spawn()`.  
> ATM it uses either `fork()` or `vfork()`. `vfork()` got deprecated on MacOS and we \
> get build errors (JDK-8274293) - even though in this case it would be completely \
> fine to use. This leaves us with `fork()` for MacOS, which has the known problems \
> with large-footprint-parents. This matters here especially since we also use \
> os::fork_and_exec to implement `-XX:OnError` for OOM situations. 
> We already use posix_spawn() as default for Runtime.exec() since JDK 15, and it is \
> available on all our Unices. We also should use it here. 
> I kept the name of the function (fork_and_exec) since people know it, even though \
> it's more incorrect now than before. 
> Tests:
> - manual tests using -XX:OnError with various scripts, including checking that env \
>                 variables are passed correctly
> - manually ran runtime/ErrorHandling tests
> - GHAs

Hi Thomas,

I've approved it so we can start baking it. I hope it will get sufficient test \
coverage.

Thanks,
David

-------------

PR: https://git.openjdk.java.net/jdk/pull/5698


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic