Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] use prctl() if available with jobs -Z



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.

;-)



Messages sorted by: Reverse Date, Date, Thread, Author