fix: run_capture popen mode 'rb' -> 'r' (glibc popen rejects 'rb' -> EINVAL, breaks Linux mirror HTTP)

这个提交包含在:
JGZYES
2026-09-01 19:15:31 +08:00
父节点 32985c5978
当前提交 66f6c2cb5e
+1 -1
查看文件
@@ -29,7 +29,7 @@
/* Read all output of `cmd` into a malloc'd buffer. */ /* Read all output of `cmd` into a malloc'd buffer. */
static char *run_capture(const char *cmd, size_t *out_len) { static char *run_capture(const char *cmd, size_t *out_len) {
FILE *f = PMM_POPEN(cmd, "rb"); FILE *f = PMM_POPEN(cmd, "r");
if (!f) { if (!f) {
if (getenv("PMM_DEBUG")) if (getenv("PMM_DEBUG"))
fprintf(stderr, "[http] popen(cmd) failed: errno=%d %s\n", errno, strerror(errno)); fprintf(stderr, "[http] popen(cmd) failed: errno=%d %s\n", errno, strerror(errno));