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

Re: jobs -Z example?



In the last episode (Mar 16), Atom Smasher said:
> On Sun, 15 Mar 2009, Bart Schaefer wrote:
> 
> > Oh, there's probably a race condition then.  Try this instead:
> >
> >  perl -e '$0 = "Test hiding command"; sleep 10;' & sleep 2; ps $!
> >
> > The extra sleep in the parent shell will give perl a bit longer to get 
> > going.
> =================
> 
> that works.

In case it stops working later, all of the *BSDs provide a setproctitle()
function to cleanly reset what shows up in ps output.  Rewriting argv[0] may
cause problems, especially if you started out with a small commandline and
environment, or if you have called setenv/putenv/unsetenv.

-- 
	Dan Nelson
	dnelson@xxxxxxxxxxxxxxx



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