From: DervishD <raul@pleyades.net>
To: Horst von Brand <brand@jupiter.cs.uni-dortmund.de>
Cc: "Perez-Gonzalez, Inaky" <inaky.perez-gonzalez@intel.com>,
Linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: argv0 revisited...
Date: Thu, 16 Jan 2003 12:27:45 +0100 [thread overview]
Message-ID: <20030116112745.GE87@DervishD> (raw)
In-Reply-To: <200301161104.h0GB4IOY011937@eeyore.valparaiso.cl>
Hi Horst :)
> > I don't like it, because it should happen at the very beginning
> > of init. Remember, is not any program, is an init. Should be a more
> > clean way, I suppose :??
> If it is init, you do have enough control over the environment to just
> hardcode the executable's name?
Yes, I can hardcode it, but I cannot avoid the admin moving
around or renaming the binary, so this is neither a solution :((
> In any case, I don't see what you want to acomplish here. Care to
> enligthen us a bit?
I've written a virtual-console-only init. Why this name and why I
coded it is a long story, but the matter is that it is an init that
doesn't need configuration (no /etc/inittab) and that has builtin
klogd, syslogd, getty and login. All the builtins are just forks, so
if you see at the ps output in a system running this, it will show
some instances of a process called 'init'. The first is an init,
true, but the second is the klogd emulator, the third is the slogd
emulator and all other are the gettylogin emulator.
That is, for clarity, those should be 'renamed'. I cannot rename
the binary, because all them are in the same binary. The only way is
mangling argv[0] in each fork, that's all. Currently, as I know for
the kernel sources that whatever the binary name argv[0] will contain
the string "init" (hope that it doesn't change in the future), I
overwrite it with 'klog', 'slog' and 'into', respectively for the
klogd emulator, the syslogd emulator and the gettylogin process. But
I would like to put more descriptive names. This is not an issue,
because I can go with those four letter names (that can reduced, more
or less meaningfully, to just one character) or even with all
processes called 'init'. The processes themselves doesn't rely on its
name for properly working. They do an openlog() in order to show
meaningful names in the system log.
That's what I want to do, and changing the names under argv[0]
seems to me as the proper solution. Anyway, it will released in a
week or so under GPL and I think that the code and documentation will
show a better (clearer, at least) picture.
Raúl
next prev parent reply other threads:[~2003-01-16 11:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
-- strict thread matches above, loose matches on Subject: below --
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
2003-01-15 18:17 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=20030116112745.GE87@DervishD \
--to=raul@pleyades.net \
--cc=brand@jupiter.cs.uni-dortmund.de \
--cc=inaky.perez-gonzalez@intel.com \
--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