This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch feat/e-wl-proxy-planb
in repository enlightenment.
View the commit online.
commit 507b2dfd50bd13621d039847715c7520a5dafd1a
Author: [email protected] <[email protected]>
AuthorDate: Mon Jun 8 10:50:49 2026 -0600
feat(start): launch e_wl_proxy and route E to a backend socket (E_WL_PROXY=1)
---
src/bin/e_start_main.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/src/bin/e_start_main.c b/src/bin/e_start_main.c
index 2e7c50ed9..28017d138 100644
--- a/src/bin/e_start_main.c
+++ b/src/bin/e_start_main.c
@@ -517,6 +517,47 @@ done:
return ret;
}
+/* Launch e_wl_proxy as a persistent sibling that owns the public Wayland
+ * socket, and point E at a private backend socket. Opt-in via E_WL_PROXY=1.
+ * The proxy outlives each E restart, so connected clients survive an E crash.
+ * Returns the proxy pid, or -1 if not started. */
+static pid_t
+_e_wl_proxy_start(void)
+{
+ const char *enable = getenv("E_WL_PROXY");
+ char *proxy_bin = NULL;
+ pid_t pid;
+
+ if (!enable || strcmp(enable, "1") != 0) return -1;
+
+ /* the name clients will use (default wayland-0), inherited by the session */
+ if (!getenv("WAYLAND_DISPLAY")) env_set("WAYLAND_DISPLAY", "wayland-0");
+ /* the private socket E will create and the proxy will connect to */
+ env_set("E_WL_SOCKET", "wayland-e");
+
+ myasprintf(&proxy_bin, "%s/e_wl_proxy", eina_prefix_bin_get(pfx));
+
+ pid = fork();
+ if (pid < 0) return -1;
+ if (pid == 0)
+ {
+ /* die with enlightenment_start so the proxy never outlives the session */
+#ifdef HAVE_PRCTL
+ prctl(PR_SET_PDEATHSIG, SIGTERM);
+#elif defined(HAVE_PROCCTL)
+ int sig = SIGTERM;
+ procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &sig);
+#endif
+ execl(proxy_bin, proxy_bin, (char *)NULL);
+ _exit(127);
+ }
+
+ /* give the proxy a moment to create the public socket before E or clients
+ * race for it; the proxy connects to the backend lazily on first client. */
+ usleep(200000);
+ return pid;
+}
+
int
main(int argc, char **argv)
{
@@ -730,6 +771,9 @@ main(int argc, char **argv)
args[argc] = NULL;
}
+ /* start the wayland proxy (if enabled) before the restart loop, so it
+ * persists across E restarts and keeps clients alive across an E crash. */
+ _e_wl_proxy_start();
/* Now looping until */
while (restart)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.