Appreciate your kind words.  I guess my concerns are twofold:
* that cron be controllable enough for safe(r) large-scale use
* that cron be more monitorable if in large-scale use

> BTW, here's an alternative to get the main cron pid
> (bash/ksh syntax):
> 
> pid=$(ptree $(pgrep cron)| head -1| cut -d\  -f1)

True, and of course that's what I really wanted, the pieces
just didn't fit together in my head somehow.  Although I'd
prefer to reduce the head+cut combination to just one process;
awk would be my first choice (more readable), but I suspect
sed is more likely to be present even in a minimized installation.
I guess that might look something like
pid=$(ptree $(pgrep cron)|sed -n -e 's/ .*//p;q')
although using builtin stuff might be even better:
pid=$(ptree $(pgrep cron)|read parent junk;echo $parent)
-- 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to