[fpc-pascal] Run process and exit (win32)

Leonardo M. Ram� martinrame at yahoo.com
Tue Oct 23 05:25:00 CEST 2007


Hi, I'm trying to start a Win32 process and exit leaving the process executing. The test scenario
is a CGI calling a simple Http server (the Synapse Http server demo).

The problem is the CGI program doesn't stop (in Firefox's status bar there's a "Transfering data
from localhost..." message until I click Stop button) until the child process is finished. If I
refresh the page, the program works as expected. 

Any hint on this?

To start the child process I use TProcess as follows:

...
    lProcess := TProcess.Create(nil);
    try
      lProcess.CommandLine := 'httpserver.exe';
      lProcess.Options := [poNoConsole];
      lProcess.Execute;
    finally
      lProcess.Free;
    end;     
...




Leonardo M. Ramé
http://leonardorame.blogspot.com

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the fpc-pascal mailing list