This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

wget crashes


I've created a little bash script to periodically get my IP number from
whatismyip.com and log changes to a file. Here it is: 

#!/bin/sh
# Connects to www.whatismyip.com every 5 minutes to get IP address, reports
and logs changes
# clear
message='- logging start'
if [ "$1" != '' ]; then
   output_filename=$1
else
   output_filename="ip_history.txt"
fi
while [ 1 ]; do IPADR2=$IPADR;
  IPADR=$(wget www.whatismyip.com/automation/n09230945.asp -O - -q)
  if [ "$IPADR" != "$IPADR2" ]; then
    dttim=$(date)
    echo $dttim $IPADR $message
    echo $dttim $IPADR $message >> $output_filename
    message=''
  fi
  sleep 300
done

I'm trying to run it under Cygwin on Windows Vista Business SP1. It sort of
works, but quite often (every few hours) it crashes. Here's an example:

Exception: STATUS_STACK_OVERFLOW at eip=6114ECA2
eax=0000201C ebx=0022C850 ecx=0021D7F8 edx=00000000 esi=00000001
edi=0022FA0C
ebp=61020A10 esp=0022C7F0 program=C:\Programs\Cygwin\bin\wget.exe, pid 8404,
thread main
cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
Stack trace:
Frame     Function  Args
End of stack trace

Any idea what I may be doing wrong?

This is probably a beginner's mistake, because this is the first time I've
used Cygwin, and I'm a beginner in the whole Unix world...

Thanks - Rowan



Rowan Sylvester-Bradley MA FIET CEng
22 Fox Green, Great Bradley, Newmarket, Suffolk CB8 9NR
Tel	07970 111231
Fax	08715 227636
Email	rowan@sylvester-bradley.org




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]