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

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



On Sat, Nov 17, 2012 at 05:28:19PM -0800, Bart Schaefer wrote:
> 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$$; :'
> 
Looks like it only works with 'ps -p $$':

% ~/temp/zsh-debug3/bin/zsh -fc 'ps p$$; jobs -Z HIDEME; ps p$$; :'
  PID TTY      STAT   TIME COMMAND
26701 pts/7    S+     0:00 /home/hpt/temp/zsh-debug3/bin/zsh -fc ps p$$; jobs -Z HIDEME; ps p$$; :
  PID TTY      STAT   TIME COMMAND
26701 pts/7    S+     0:00 /home/hpt/temp/zsh-debug3/bin/zsh -fc ps p$$; jobs -Z HIDEME; ps p$$; :
% ~/temp/zsh-debug3/bin/zsh -fc 'ps -p$$; jobs -Z HIDEME; ps -p$$; :'
  PID TTY          TIME CMD
26713 pts/7    00:00:00 zsh
  PID TTY          TIME CMD
26713 pts/7    00:00:00 HIDEME
%



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