From: DervishD <raul@pleyades.net>
To: Linux-kernel <linux-kernel@vger.kernel.org>
Subject: argv0 revisited...
Date: Wed, 15 Jan 2003 19:17:28 +0100 [thread overview]
Message-ID: <20030115181728.GA47@DervishD> (raw)
Hi all :))
Finally, with a suitable solution at hand, I notice that the
kernel does just what I wanted to do, that is, overwriting the
argv[0]. The matter is that when executing the init process, the
kernel substitutes the program name, the true argv0, with the string
'init' :(( That is, I'm not able to exec'ing myself again, because I
no longer know what is the binary name!
How can I know, more or less portably, which is the name of the
disk binary corresponding to my core image? Since 'proc' is not
mounted at this time, I cannot consult my mappings not my 'exe'
link. Since this init is run as root, any that root can do is
welcome. Although I would like a portable solution, any solution that
works under *any* Linux kernel is welcome...
BTW, is the argv0 mangling for 'init' mandatory or POSIX or
standard or...?
Thanks a lot :)
Raúl
next reply other threads:[~2003-01-15 18:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-15 18:17 DervishD [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-01-15 18:22 argv0 revisited Perez-Gonzalez, Inaky
2003-01-15 18:44 ` DervishD
2003-01-16 11:04 ` Horst von Brand
2003-01-16 11:27 ` DervishD
2003-01-17 10:51 ` Rogier Wolff
2003-01-17 11:20 ` DervishD
[not found] ` <200301161603.h0GG3DX0001895@eeyore.valparaiso.cl>
2003-01-17 10:58 ` DervishD
2003-01-15 18:51 Perez-Gonzalez, Inaky
2003-01-15 19:19 ` DervishD
2003-01-15 19:46 ` Miquel van Smoorenburg
2003-01-15 20:22 ` DervishD
2003-01-16 14:59 ` Jakob Oestergaard
2003-01-17 10:55 ` DervishD
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=20030115181728.GA47@DervishD \
--to=raul@pleyades.net \
--cc=linux-kernel@vger.kernel.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