Public bug reported:
I've modified qemu to overwrite its arguments to set the process title,
since its current prctl() method has a 16-character limit.
I posted the original patch to qemu-devel, made the changes others
suggested, then re-posted to qemu-devel. I flailed around a bit with the
patch
** Attachment added: "qemu-overwrite-argv-to-set-process-title.patch"
https://bugs.launchpad.net/bugs/690776/+attachment/1767059/+files/qemu-overwrite-argv-to-set-process-title.patch
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU
s get the process name from
/proc/PID/status.
Signed-off-by: John Morrissey
---
os-posix.c | 34 +-
qemu-os-posix.h |2 +-
qemu-os-win32.h |3 ++-
vl.c| 11 +--
4 files changed, 33 insertions(+), 17 deletions(-)
diff --git a/os-po
+}
+#endif
+
last_argv_byte = argv[argc - 1] + strlen(argv[argc - 1]);
len = snprintf(argv[0], last_argv_byte - argv[0], "%s", name);
--
John Morrissey _o/\ __o
j...@horde.net_-< \_ / \ < \,
www.horde.net/__(_)/_(_)/\___(_) /_(_)__
On Sun, Nov 07, 2010 at 07:27:22PM +0100, Andreas Färber wrote:
> Am 07.11.2010 um 16:44 schrieb John Morrissey:
> >@@ -149,20 +145,24 @@ char *os_find_datadir(const char *argv0)
> >#undef SHARE_SUFFIX
> >#undef BUILD_SUFFIX
> >
> >-void os_set_proc_name(const c
Linux seems to maintain the length of the original args, even when the new
args are shorter and NULL-terminated, so the trailing whitespace in ps(1)
output is probably unavoidable. I've seen the same result with other daemons
that overwrite argv.
Signed-off-by: John Morrissey
---
os-po
a=commit;h=c08c7b0143b8cdc542e5f4137623d412340c5cf2
--
John Morrissey _o/\ __o
j...@horde.net_-< \_ / \ < \,
www.horde.net/__(_)/_(_)/\___(_) /_(_)__
diff --git a/os-posix.c b/os-posix.c
index 6321e99..4d85384 100644
--- a/
a=commit;h=c08c7b0143b8cdc542e5f4137623d412340c5cf2
--
John Morrissey _o/\ __o
j...@horde.net_-< \_ / \ < \,
www.horde.net/__(_)/_(_)/\___(_) /_(_)__
diff --git a/os-posix.c b/os-posix.c
index 6321e99..4d85384 100644
--- a/
Public bug reported:
Trivial, but it was triggering the OCD.
diff --git a/vl.c b/vl.c
index df414ef..9c76a55 100644
--- a/vl.c
+++ b/vl.c
@@ -2524,7 +2524,7 @@ int main(int argc, char **argv, char **envp)
if (p != NULL) {
*p++ = 0;