mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Robert White" <rwhite@casabyte.com>
To: <linux-kernel@vger.kernel.org>
Subject: Stupid API Question.
Date: Mon, 7 Apr 2003 12:50:53 -0700	[thread overview]
Message-ID: <PEEPIDHAKMCGHDBJLHKGGEIHCGAA.rwhite@casabyte.com> (raw)

I have looked, but I have not found...

Is there a (safe) Kernel API for setting a processes appearance on the PS
listing? (e.g. it's name etc.)

I have seen the nonsense about clearing out your various argv[] elements and
then using strncpy to replace argv[0].  That seems neither safe nor elegant.
It also seems thread unsafe, or at least thread un-interesting, since all
the threads would be tagged with the same/last such call.

If it exists, where might it be found?


If it doesn't exist...

An API that could change the text for everything after argv[0] and filled a
pointer in the process structure for the process, would be interesting.

I say *after* argv[0] because I think having *any* means to change the
presentation of argv[0] is a far-too-gaping security hole.

I have no idea what the order of magnitude for this effort might be.
Managing a normally-null pointer that overrides the various facts if it is
set, and is freed back into the kernel memory pool when the process exits,
wouldn't be that tough.  Intercepting whatever ps(1) (etc.) does to build
the output might be non-trivial.

Anyway, just a thought...

Rob.


             reply	other threads:[~2003-04-07 19:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-07 19:50 Robert White [this message]
2003-04-07 20:28 ` Richard B. Johnson

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=PEEPIDHAKMCGHDBJLHKGGEIHCGAA.rwhite@casabyte.com \
    --to=rwhite@casabyte.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

all inboxes | Powered by JetHome®