I am trying to use an exiting CGI.EXE program on 64bit Ubuntu Lucid.
I have made a test program with the compiler (Borland C++Builder 5 – BCB5) that just starts prints and closes.
Code: Select all
#include <vcl.h>
#include <conio.h>
#pragma hdrstop
#pragma argsused
int main(int argc, char* argv[])
{
cprintf("small test");
return 0;
}
Code: Select all
before="$(date +%s%N)"
wine ./testProject1.exe
after="$(date +%s%N)"
elapsed_seconds="$(expr $after - $before)"
echo Elapsed time for code block: $elapsed_seconds
Problem 1.
On 32bit ( Ubuntu Hardy 8.04 wine-1.1.26) it loads and exists in about 0.2 seconds.
On 64bit (Ubuntu Lucid. 10.04 wine-1.1.26 , wine-1.1.38 and latest in repository) it takes about 1.1 seconds to load and exit).
I tried various wine versions.
First time with wine-1.1.38 it gave this message:
“Could not load wine-gecko. HTML rendering will be disabled.
wine: configuration in '/home/xie01/.wine' has been updated.”
I have also noticed it sometimes seems to launch a copy of explorer.exe (i'm not sure which wine version it was).
Question: Any Ideas as to here to start to look for the difference in speed?
Problem 2.
Being a CGI, apache2 will load multiple copies.
If I test this in a bash script:
for (( c=1; c<=100; c++ ))
do
echo "$c times..."
.wine ./testProject1.exe &
#above line will fork
done
I get errors including:
andwine: Invalid handle
– This file obviously does exist(first few loads are ok then fails start).err:module:import_dll Library BORLNDMM.DLL (which is needed by L"Z:\\var\\www\\cgi-bin\\testProject1.exe") not found
It seems as though wine do not have enough file handles available to load many copies at the same time.
Question: Where (if possible) does one adjust the number of available file handles.
Thanking you in advance.
Lafras
[/code]