Comment 2 for bug 1835839

Revision history for this message
John Paul Adrian Glaubitz (glaubitz) wrote : Re: [Bug 1835839] Re: qemu-user: $0 incorrectly always reports absolute path

On 7/9/19 1:54 PM, Laurent Vivier wrote:
> ** Patch added: "Enable binfmt-misc preserve-arg[0] flag"
> https://bugs.launchpad.net/qemu/+bug/1835839/+attachment/5275869/+files/0001-linux-user-manage-binfmt-misc-preserve-arg-0-flags.patch

Thanks! I just tried the patch and ran the setup script with:

./scripts/qemu-binfmt-conf.sh --debian --qemu-path=/usr/bin --qemu-suffix=-static --preserve-arg0 yes

and:

root@nofan:~/qemu> systemctl restart binfmt-support.service
root@nofan:~/qemu>

But still don't get the correct path:

(sid-m68k-sbuild)root@nofan:/# sh -c 'echo $0'
/bin/sh
(sid-m68k-sbuild)root@nofan:/#

Do I need to do anything else?

--
 .''`. John Paul Adrian Glaubitz
: :' : Debian Developer - <email address hidden>
`. `' Freie Universitaet Berlin - <email address hidden>
  `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913