[fpc-pascal] loadlibrary() unsafe ?

Ewald ewald at yellowcouch.org
Sat Jun 20 13:13:06 CEST 2015


On 06/20/2015 09:05 AM, fredvs wrote:
> Hello.
>
> Sorry to come back with that story... ;-(
>
> I have used inside a script LD_LIBRARY_PATH` and at end runs the espeak
> executable.
>
> So a Tprocess run the script.
Why use a script? When you exec(), a parameter is available to set the
environment variables[1]. Using a TProcess, try setting the
`Environment` property before running it[2].

Hope it helps :-)

[1] http://linux.die.net/man/3/exec
[2]
http://www.freepascal.org/docs-html/fcl/process/tprocess.environment.html

-- 
Ewald




More information about the fpc-pascal mailing list