Web Servers on Windows - multiple instances of CGI unable to exec cmd simultaneously

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Windows > September 2005 > multiple instances of CGI unable to exec cmd simultaneously





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author multiple instances of CGI unable to exec cmd simultaneously
hgopakumar@gmail.com

2005-09-08, 5:51 pm


I am using Apache 2.0.54 on Windows XP SP2. I am invoking CGI (.exe)
over SSL via POST method. Inside the CGI there is a command:

system("tar ...");

If I invoke this CGI simultaneously only the first one is able to
execute the command, later ones give the error:

The process cannot access the file because it is being used by another
process.\r, referer: https://192.168.1.1/

Any ideas, would this be a configuration problem ?

--Gopu

Dr Clue

2005-09-08, 8:49 pm

hgopakumar@gmail.com wrote:
> I am using Apache 2.0.54 on Windows XP SP2. I am invoking CGI (.exe)
> over SSL via POST method. Inside the CGI there is a command:
>
> system("tar ...");
>
> If I invoke this CGI simultaneously only the first one is able to
> execute the command, later ones give the error:
>
> The process cannot access the file because it is being used by another
> process.\r, referer: https://192.168.1.1/
>
> Any ideas, would this be a configuration problem ?


I always have a harder time with this type of thing on windows,
but possibly could you mark the folder sharable?




--
--.
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML/CSS,Javascript,TCP ...
--`
hgopakumar@gmail.com

2005-09-09, 5:52 pm

I got it working. Problem was that, for debugging I was executing:

system("tar ... 2>> debug.out");

So the first instance opened the debug.out file and Windows does not
allow the subsequent instances to open the file for writing.

Thank You Dr. Clue for responding.

--Gopu

Dr Clue

2005-09-09, 5:52 pm

hgopakumar@gmail.com wrote:
> I got it working. Problem was that, for debugging I was executing:
>
> system("tar ... 2>> debug.out");
>
> So the first instance opened the debug.out file and Windows does not
> allow the subsequent instances to open the file for writing.
>
> Thank You Dr. Clue for responding.
>


No problem. I'll try and keep your experiance and ultimate resolution
in mind for the next person that asks a similar question.

Togeather us lowly coders can solve most anything!



--
--.
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML/CSS,Javascript,TCP ...
--`
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com