[Webkit-unassigned] [Bug 222049] New: [WPE][GTK] Avoid another child setup function in process launcher code
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 17 10:27:58 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=222049
Bug ID: 222049
Summary: [WPE][GTK] Avoid another child setup function in
process launcher code
Product: WebKit
Version: WebKit Nightly Build
Hardware: PC
OS: Linux
Status: NEW
Severity: Normal
Priority: P2
Component: WebKitGTK
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mcatanzaro at gnome.org
CC: bugs-noreply at webkitgtk.org, pgriffis at igalia.com
This is a follow-up to bug #220090. Avoiding child setup functions is desirable because it could allow GSubprocess to use posix_spawn() instead of fork() in the future. That's not possible to do if we have code that needs to run between fork() and exec().
In this case, the child setup is used only to unset CLOEXEC. We could simply not set it in the first place. This only fails if a secondary thread decides to launch a subprocess before XDGDBusProxyLauncher::launch returns. That window already exists in many other places (e.g. anywhere else setCloseOnExec is called, such as for IPC::Connection objects). Threads should not do that.
This also fixes a bug where unsetting CLOEXEC would fail if we get unlucky and receive EINTR. A loop is required here. WTF::setCloseOnExec handles that for us.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210217/6bded468/attachment.htm>
More information about the webkit-unassigned
mailing list