bash is crashing

Cary Jamison Cary_Jamison@Symantec.com
Thu Aug 4 17:10:00 GMT 2005


Eric Blake wrote:
>>I have a simple script I sometimes run that monitors a directory for any 
>>files dumped in it (sleeps 10 seconds, processes any new files, and loops 
>>around).  Since upgrading this script is causing bash to crash.  It doesn't 
>>happen immediately, so I'm not sure where exactly in my script this is 
>>happening.  I'll try to narrow it down more, but in the meantime I thought I 
>>would check here for any help.
> 
> 
> Posting the problem script would be a good start.  But any crash in
> bash is a bug that should be identified and fixed.

Ok, I should have sent it too.  There is probably a better way to do 
this, but here it is...

#!/bin/bash

# scp anything in the sync directory to the remote machine
# and then move it to the done directory.
# Currently only works with single files, not directories.

RHOST=cjp
RDIR="~/sync/recv"
LDIR=~/sync
LDONEDIR=~/sync/done
LOGFILE=~/synclog
TIMESTAMP=%D:%T
DATE="date +$TIMESTAMP"

echo $($DATE) sync.sh starting > $LOGFILE

cd $LDIR
while true
do
   sleep 10
   for i in * .[^.]*
   do
     if [[ -f $i ]]
     then
           echo -ne $($DATE)\\040 >> $LOGFILE
           if scp -p -q $i $RHOST:$RDIR >> $LOGFILE 2>&1
           then
             mv $i $LDONEDIR
             echo $($DATE) copied $i >> $LOGFILE
           fi
     fi
   done
done


> 
>>begin 666 cygcheck.txt
>>M#0I#>6=W:6X@0V]N9FEG=7)A=&EO;B!$:6%G;F]S=&EC<PT*0W5R<F5N="!3
> 
> 
>>Problem reports:       http://cygwin.com/problems.html
> 
> 
> The problem-reporting guidelines suggest plain-text (not encoded)
> cygcheck attachements for a reason.  I can't decipher your output
> in my webmail reader.

I thought I had, but when posting to gmane with outlook-express, it 
encoded it without me knowing.  I just tried a regular email to the mail 
list using notes and it got rejected because of the same thing.  So, now 
I'm trying Mozilla's newsreader to gmane again.  If this doesn't work, 
I'll probably just give up.  Anyway, here are some parts you may care 
about :

cygwin dll 1.5.18
bash 3.0-8


Thanks,
Cary
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050804/50bce118/attachment.txt>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list