I follow you. Yes, I am running scripts not -exec &#39;ing external scripts.<br>cd foo<br>script -a -c &quot;./bar.sh param1 param2&quot; &quot;$log_file<br><br>wash, rinse, repeat...<br><br>It really is a difference between how processes are handled between the two different environment of a regular login and a cron job. I&#39;m rewriting my logger to be basic bash I/O redirects. I think that will resolve the nasty looping processes. script is designed to be able to replay process. Tht&#39;s probably not a good thing to have as an automated function :-)<br>
<br><div class="gmail_quote">On Wed, Dec 16, 2009 at 8:32 PM, Ed Cashin <span dir="ltr">&lt;<a href="mailto:ecashin@noserose.net">ecashin@noserose.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, Dec 16, 2009 at 6:49 PM, Jim Kinney &lt;<a href="mailto:jim.kinney@gmail.com">jim.kinney@gmail.com</a>&gt; wrote:<br>
&gt; script runs all hunky-dorey in userland.<br>
&gt;<br>
&gt; so time to put it into cron. To cover my bases for inferior cron<br>
&gt; environemnt, the first thing the script does is . ~/.bash_profile which in<br>
&gt; turn runs ~/.bash_rc which runs /etc/bashrc<br>
<br>
</div>If you are &quot;running&quot; scripts, you&#39;re creating new bash processes, but<br>
if you use exec instead, you&#39;ll replace the running process with a new<br>
one.<br>
<br>
ecashin@Ed-Cashins-MacBook-Pro ~$ cat /tmp/count-procs<br>
#! /bin/sh<br>
ps ax | wc -l<br>
ecashin@Ed-Cashins-MacBook-Pro ~$ cat /tmp/test-run<br>
/tmp/count-procs<br>
ecashin@Ed-Cashins-MacBook-Pro ~$ sh /tmp/test-run<br>
      52<br>
ecashin@Ed-Cashins-MacBook-Pro ~$ cat /tmp/test-exec<br>
exec /tmp/count-procs<br>
ecashin@Ed-Cashins-MacBook-Pro ~$ sh /tmp/test-exec<br>
      51<br>
ecashin@Ed-Cashins-MacBook-Pro ~$<br>
<div class="im"><br>
...<br>
&gt; Except somehow it now spawns _2_ copies of the running process and the race<br>
&gt; is on! &lt;insert appropriate swearing here&gt;<br>
<br>
</div>Do the above comments seem relevant?  I can&#39;t really tell if that&#39;s all<br>
there is to it.<br>
<font color="#888888"><br>
--<br>
  Ed Cashin &lt;<a href="mailto:ecashin@noserose.net">ecashin@noserose.net</a>&gt;<br>
  <a href="http://noserose.net/e/" target="_blank">http://noserose.net/e/</a><br>
  <a href="http://www.coraid.com/" target="_blank">http://www.coraid.com/</a><br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-- <br>James P. Kinney III<br>Actively in pursuit of Life, Liberty and Happiness         <br><br>