zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Han Pingtian <hanpt@linux.vnet.ibm.com>,
	zsh-workers <zsh-workers@zsh.org>
Subject: Re: [PATCH] use prctl() if available with jobs -Z
Date: Sat, 17 Nov 2012 17:28:19 -0800	[thread overview]
Message-ID: <121117172819.ZM9878@torch.brasslantern.com> (raw)
In-Reply-To: <20121117123817.GA20447@localhost.localdomain>

Does this prctl call really have the same/desired effect of covering up
the entire argument list in the output of "ps"?  I don't have a system
available where I can test it.

E.g. try this:
    zsh -fc 'ps p$$; jobs -Z HIDEME; ps p$$; :'

(the trailing ":" is to avoid tail-call optimization on forking "ps").

The whole point of "jobs -Z" was to masquerade your process when using
a time-sharing system, not merely to change the value of argv[0].  You
know, so the prof can't tell you're spending all day playing nethack
instead of doing your CS303 homework.

I'm all for using standard interfaces to accomplish standard actions,
but if we're going to include a hack like this one then we ought to do
our best to have the hack actually be a hack.

;-)


  reply	other threads:[~2012-11-18  1:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-17 12:38 Han Pingtian
2012-11-18  1:28 ` Bart Schaefer [this message]
2012-11-18  2:16   ` Han Pingtian

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=121117172819.ZM9878@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=hanpt@linux.vnet.ibm.com \
    --cc=zsh-workers@zsh.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).