From: Richard Jones Date: Wed, 21 Oct 2009 15:31:26 +0000 (+0100) Subject: Set LC_ALL=C before running qemu. X-Git-Tag: 1.0.75~10 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=805cb234f3d9b3afc6c4bb7c82d9f7c64caeabce;p=libguestfs.git Set LC_ALL=C before running qemu. --- diff --git a/src/guestfs.c b/src/guestfs.c index e49f57a..a25e9e7 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -1195,6 +1195,8 @@ guestfs__launch (guestfs_h *g) setpgid (0, 0); #endif + setenv ("LC_ALL", "C", 1); + execv (g->qemu, g->cmdline); /* Run qemu. */ perror (g->qemu); _exit (1); @@ -1486,7 +1488,7 @@ test_qemu (guestfs_h *g) g->qemu_help = NULL; g->qemu_version = NULL; - snprintf (cmd, sizeof cmd, "'%s' -help", g->qemu); + snprintf (cmd, sizeof cmd, "LC_ALL=C '%s' -help", g->qemu); fp = popen (cmd, "r"); /* qemu -help should always work (qemu -version OTOH wasn't @@ -1508,7 +1510,7 @@ test_qemu (guestfs_h *g) if (pclose (fp) == -1) goto error; - snprintf (cmd, sizeof cmd, "'%s' -version 2>/dev/null", g->qemu); + snprintf (cmd, sizeof cmd, "LC_ALL=C '%s' -version 2>/dev/null", g->qemu); fp = popen (cmd, "r"); if (fp) {