From: William Lee Irwin III <wli@holomorphy.com>
To: Linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: setproctitle
Date: Fri, 20 Aug 2004 09:33:22 -0700 [thread overview]
Message-ID: <20040820163322.GH11200@holomorphy.com> (raw)
In-Reply-To: <20040820162027.GA1238@DervishD>
* William Lee Irwin III <wli@holomorphy.com> dixit:
>> The command-line arguments are being fetched from the process address
>> space, i.e. simply editing argv[] in userspace will have the desired
>> effect. Though this code is butt ugly.
On Fri, Aug 20, 2004 at 06:20:27PM +0200, DervishD wrote:
> The problem with this is that is non-portable. Not all Unices
> (AFAIK) have this behaviour. The portable solution for changing
> argv[0] is to use ONLY the space currently allocated to argv[0]. I
> mean, you take argv[0], do a strlen() and overwrite only strlen bytes
> of it. The problem with this is that you cannot write an arbitrary
> string there. If all Unices provide 'setproctitle' that problem
> dissapears.
> Anyway is cool to know that, under Linux, I can change the
> argv[0] with no problems.
It is not portable behavior. It is a description of how to implement
setproctitle(3) in Linux.
-- wli
next prev parent reply other threads:[~2004-08-20 16:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-18 8:28 setproctitle DervishD
2004-08-18 8:58 ` setproctitle William Lee Irwin III
2004-08-18 21:21 ` setproctitle Robert White
2004-08-18 21:28 ` setproctitle William Lee Irwin III
2004-08-18 21:46 ` setproctitle Richard B. Johnson
2004-08-20 16:23 ` setproctitle 'DervishD'
2004-08-20 16:20 ` setproctitle DervishD
2004-08-20 16:33 ` William Lee Irwin III [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-08-19 1:04 setproctitle Albert Cahalan
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=20040820163322.GH11200@holomorphy.com \
--to=wli@holomorphy.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.