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

Re: jobs -Z example?



On Mar 16, 10:41am, Atom Smasher wrote:
}
} On Sun, 15 Mar 2009, Bart Schaefer wrote:
} 
} > Try this:
} >
} >    perl -e '$0 = "Test hiding command"; sleep 10;' & ps $!
} >
} > If perl is able to do it but zsh is not, then it's just that FreeBSD has 
} > a different mechanism for it and we may be able to patch zsh.
} =====================
} 
} weird.... (FreeBSD 6.2-RELEASE amd64) it sometimes works under bash, 
} doesn't work under zsh. see below. similar results in a 7.1-STABLE jail, 
} but it seems more likely to work as desired.

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.

Your evidence so far indicates that assigning to $0 in perl is able
to change the command, so there must be something perl is doing that
"jobs -Z" is not doing.



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