qemu-user: $0 incorrectly always reports absolute path
Bug #1835839 reported by
John Paul Adrian Glaubitz
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
We just ran into an issue with the Perl package on Debian/m68k when being built with qemu-user [1].
The problem can be boiled down to qemu-user always reporting absolute paths for the shell variable $0 no matter on how the command was invoked.
A simple reproducer is this:
On normal system (no emulation):
root@nofan:~> sh -c 'echo $0'
sh
root@nofan:~>
On qemu-user:
(sid-m68k-
/bin/sh
(sid-m68k-
> [1] https:/
To post a comment you must log in.
Tentative patch