qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: lists@fixnum.org
To: qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org
Subject: [Qemu-devel] [PATCH] linux-user: added fake open() for /proc/self/cmdline
Date: Tue, 17 Jun 2014 05:16:58 +0200	[thread overview]
Message-ID: <1402975019-19503-1-git-send-email-lists@fixnum.org> (raw)



A piece of software I use depends on /proc/self/cmdline to determine the command with which it was invoked.
When using linux-user, that file would read:

	$ hd /proc/self/cmdline 
	00000000  2f 75 73 72 2f 62 69 6e  2f 71 65 6d 75 2d 61 72  |/usr/bin/qemu-ar|
	00000010  6d 2d 73 74 61 74 69 63  00 2f 75 73 72 2f 62 69  |m-static./usr/bi|
	00000020  6e 2f 68 64 00 2f 70 72  6f 63 2f 73 65 6c 66 2f  |n/hd./proc/self/|
	00000030  63 6d 64 6c 69 6e 65 00                           |cmdline.|

With this patch, the first word is omitted from the process's own cmdline entry, removing the emulator path from the file:

	$ hd /proc/self/cmdline 
	00000000  2f 75 73 72 2f 62 69 6e  2f 68 64 00 2f 70 72 6f  |/usr/bin/hd./pro|
	00000010  63 2f 73 65 6c 66 2f 63  6d 64 6c 69 6e 65 00     |c/self/cmdline.|
	0000001f

Kind regards,

Wim

             reply	other threads:[~2014-06-17 16:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17  3:16 lists [this message]
2014-06-17  3:16 ` [Qemu-devel] [PATCH] linux-user: added fake open() for /proc/self/cmdline lists
2014-06-17 21:09   ` Eric Blake
2014-06-18  9:02     ` lists
2014-06-18  9:02       ` lists
2014-06-20 12:37         ` Riku Voipio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1402975019-19503-1-git-send-email-lists@fixnum.org \
    --to=lists@fixnum.org \
    --cc=alex.bennee@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).