in reply to How to change process title ?
Appears to work:To actually alter the visible command line, you can assign to the vari +- able $0 as documented in perlvar. This won't work on all operating systems, though.
$ perl -e '$0="foo"; 1 while 1' & [1] 19748 $ ps U blazar PID TTY STAT TIME COMMAND 19585 ? S 0:00 sshd: blazar@pts/0 19592 pts/0 Ss 0:00 -bash 19748 pts/0 R 0:06 foo 19758 pts/0 R+ 0:00 ps U blazar
Update: thanks to tirwhan for suggesting s/(?<=ps )aux | grep(?= blazar)/U/.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to change process title ?
by mescanne (Sexton) on Oct 17, 2005 at 15:37 UTC | |
by blazar (Canon) on Oct 18, 2005 at 06:46 UTC |