A rootless Android app that boots Alpine Linux: run containers (Podman/Docker/LXC) and GUI desktop apps.
fix(hostbridge): bound the guest CLI read with a timeout
ExTv7489adc79b4a
diff --git a/build-rootfs/host-bridge/podroid-hostd.c b/build-rootfs/host-bridge/podroid-hostd.cindex cdb5528..8a7358a 100644--- a/build-rootfs/host-bridge/podroid-hostd.c+++ b/build-rootfs/host-bridge/podroid-hostd.c@@ -370,7 +370,11 @@ static int daemon_main(void) {if (cli < 0) { if (errno == EINTR) continue; break; }char req[8192];- int rn = read_line(cli, req, sizeof(req));+ /* Bound the CLI read: a guest process that connects but never sends a+ * newline would otherwise wedge this single-threaded loop forever and+ * hang every other podroid-* call. The host channel below already uses+ * the same timeout; the CLI side must too. */+ int rn = read_line_timeout(cli, req, sizeof(req), HOST_TIMEOUT_S);if (rn <= 0) { close(cli); continue; }if (host_fd < 0) {