[webkit-changes] [WebKit/WebKit] 9d195c: REGRESSION(254232 at main): Causes process launching ...

Michael Catanzaro noreply at github.com
Sun Oct 9 06:43:10 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9d195cb5d885d32433a7d79547c6a70c16c0959f
      https://github.com/WebKit/WebKit/commit/9d195cb5d885d32433a7d79547c6a70c16c0959f
  Author: Michael Catanzaro <mcatanzaro at redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
    M Source/WebKit/UIProcess/Launcher/glib/XDGDBusProxy.cpp

  Log Message:
  -----------
  REGRESSION(254232 at main): Causes process launching to use fork + exec instead of posix_spawn
https://bugs.webkit.org/show_bug.cgi?id=245784

Reviewed by Carlos Garcia Campos.

254232 at main removed use of G_SUBPROCESS_FLAGS_INHERIT_FDS since we
actually do not ever want to inherit fds into our child processes,
except for those that we explicitly pass along using
g_subprocess_launcher_take_fd(). This was a good change since it makes
WebKit more robust to file descriptor leaks, but there is an unfortunate
side effect: it prevents gspawn from using posix_spawn() to launch
subprocesses, so we wind up falling back to fork() and exec() instead. I
had left an insufficient warning comment about this, but it only
mentioned one of the many things that could cause us to fall back to
fork()/exec(). So:

 * Revert 254232 at main
 * Avoid reintroducing bug #221489 by setting CLOEXEC on the client end
   of the IPC socket
 * Improve the warning comments to indicate there is more than one way
   to cause us to fall back to fork()/exec()

* Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
(WebKit::connectionOptions):
(WebKit::ProcessLauncher::launchProcess):
* Source/WebKit/UIProcess/Launcher/glib/XDGDBusProxy.cpp:
(WebKit::XDGDBusProxy::launch):

Canonical link: https://commits.webkit.org/255325@main




More information about the webkit-changes mailing list