Ok. I have another post going with a related problem I guess (http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=3882&page=1)
Basically, I'm using cygwin to compile, and then double clicking the exe to run. If I try to './startup &' it through cygwin I get the following error:
The startup script is pasted below. Before you ask, I do have sh.exe in the described location, and my exe is in the area directory.
Thanks
Basically, I'm using cygwin to compile, and then double clicking the exe to run. If I try to './startup &' it through cygwin I get the following error:
Quote:
./startup: 4: Syntax error: word unexpected (expecting "then")
./startup: 4: Syntax error: word unexpected (expecting "then")
The startup script is pasted below. Before you ask, I do have sh.exe in the described location, and my exe is in the area directory.
Quote:
#! ../../../../../bin/sh -f
set port = 4000
if ( "$1" != "" ) set port="$1"
cd ../area
nohup
nice
limit stack 1024k
if ( -e shutdown.txt ) rm -f shutdown.txt
while ( 1 )
set index = 1000
while ( 1 )
set logfile = ../log/$index.log
if ( ! -e $logfile ) break
@ index++
end
date > $logfile
date > ../area/boot.txt
../area/toth $port >&! $logfile
if ( -e shutdown.txt ) then
rm -f shutdown.txt
exit 0
endif
sleep 15
end
#! ../../../../../bin/sh -f
set port = 4000
if ( "$1" != "" ) set port="$1"
cd ../area
nohup
nice
limit stack 1024k
if ( -e shutdown.txt ) rm -f shutdown.txt
while ( 1 )
set index = 1000
while ( 1 )
set logfile = ../log/$index.log
if ( ! -e $logfile ) break
@ index++
end
date > $logfile
date > ../area/boot.txt
../area/toth $port >&! $logfile
if ( -e shutdown.txt ) then
rm -f shutdown.txt
exit 0
endif
sleep 15
end
Thanks