mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-14 05:41:16 +02:00
LazUtils: Prevent a zombie process with openDocument and openURL. Issue #35527.
This commit is contained in:
parent
05cf5afbc2
commit
b7d8333fd9
@ -153,8 +153,7 @@ begin
|
||||
Result:='';
|
||||
end;
|
||||
|
||||
// Runs a short command which should point to an executable in
|
||||
// the environment PATH
|
||||
// Runs a short command which should point to an executable in the environment PATH
|
||||
// For example: ProgramFilename='ls' CmdLineParameters='-l /home'
|
||||
// Will locate and execute the file '/bin/ls'
|
||||
// If the command isn't found, an exception will be raised
|
||||
@ -174,6 +173,7 @@ begin
|
||||
BrowserProcess := TProcessUTF8.Create(nil);
|
||||
try
|
||||
BrowserProcess.InheritHandles:=false;
|
||||
BrowserProcess.Options := [poWaitOnExit]; // Prevent a zombie process.
|
||||
// Encloses the executable with "" if its name has spaces
|
||||
if Pos(' ',NewProgramFilename)>0 then
|
||||
NewProgramFilename:='"'+NewProgramFilename+'"';
|
||||
|
Loading…
Reference in New Issue
Block a user