My only comment is that it's not cross platform; we experimented a while back trying to get something similar that was cross platform, and there are some operating systems that simply don't allow you to change the process title (Solaris is one of them, I don't think /usr/ucb/ps worked).
There's similar code in the Caudium CVS repository, I don't recall whether it had other fallbacks for systems that don't support setproctitle (like mucking with argv)...
Bill
On Mon, 20 Mar 2006, Adam Montague wrote:
On Tue, 7 Mar 2006 16:17:46 -0500 Adam Montague amontague@siriushosting.com wrote:
Here's a patch to add in System.setproctitle() for systems that have it.
Adam
Any comments on this? Any objections? Its kinda nice for apps like mine where ps output is normally ~250 characters wide, to reduce it to just
"pike: Myapp running in mydir (pike)"
And for making the current status of the app visable through ps.
Adam