Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-03

TProcess and Environment

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jason P Sage

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

Reply by email