[fpc-devel] TProcess and Environment

Jason P Sage jasonpsage at jegas.org
Mon Mar 12 06:08:15 CET 2007


Could anyone give a simple example of how to set the
TProcess.Environment variables?

I have something like:

PROCESS:=TProcess.Create(nil);
PROCESS.Environment:=TStringList.Create;
PROCESS.Environment.NameValueSeparator:='~';
PROCESS.Environment.Add('REMOTE_ADDR~'+rWebServerRequest.IP);
PROCESS.Environment.Add('SERVER_SOFTWARE~'+grJISConfig.saServerSoftware)
;
PROCESS.Environment.Add('DOCUMENT_ROOT~'+rWebServerRequest.saRequestedDi
r);


Everything compiles - but the resultant environment in the application I
execute (fast-cgi's echo because it shows the environment variables)
reports
One long line. 

I've tried the equal sign instead of the tilde.

Does any one know what it missing?

Thank you in Advance,
Jason P Sage





More information about the fpc-devel mailing list