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.
ATM it uses either `fork()` or `vfork()`. `vfork()` got deprecated on MacOS and we get build errors (
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.
- relates to
-
JDK-8266392 ShowMessageBoxOnError debugging is broken on mac
-
- Closed
-