mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 20:09:25 +02:00
* Child inherits now file handles from parent in Exec by default
This commit is contained in:
parent
aeb8ec0d54
commit
d0e2d02282
@ -161,8 +161,10 @@ Procedure Keep(exitcode: word);
|
||||
|
||||
Const
|
||||
{ allow EXEC to inherited handles from calling process,
|
||||
needed for FPREDIR in ide/text PM }
|
||||
ExecInheritsHandles : BOOL = false;
|
||||
needed for FPREDIR in ide/text
|
||||
now set to true by default because
|
||||
other OS also pass open handles to childs PM }
|
||||
ExecInheritsHandles : BOOL = true;
|
||||
|
||||
implementation
|
||||
uses strings;
|
||||
@ -359,7 +361,6 @@ var
|
||||
l : Longint;
|
||||
AppPath,
|
||||
AppParam : array[0..255] of char;
|
||||
InheritedHandles : BOOL;
|
||||
begin
|
||||
FillChar(SI, SizeOf(SI), 0);
|
||||
SI.cb:=SizeOf(SI);
|
||||
@ -370,9 +371,8 @@ begin
|
||||
AppParam[1]:=' ';
|
||||
Move(ComLine[1],AppParam[2],length(Comline));
|
||||
AppParam[Length(ComLine)+2]:=#0;
|
||||
InheritedHandles:=ExecInheritsHandles;
|
||||
if not CreateProcess(PChar(@AppPath), PChar(@AppParam),
|
||||
Nil, Nil, InheritedHandles,$20, Nil, Nil, SI, PI) then
|
||||
Nil, Nil, ExecInheritedHandles,$20, Nil, Nil, SI, PI) then
|
||||
begin
|
||||
DosError:=Last2DosError(GetLastError);
|
||||
exit;
|
||||
@ -894,7 +894,10 @@ End;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.20 1999-09-21 11:34:40 pierre
|
||||
Revision 1.21 1999-09-21 12:37:09 pierre
|
||||
* Child inherits now file handles from parent in Exec by default
|
||||
|
||||
Revision 1.20 1999/09/21 11:34:40 pierre
|
||||
+ ExecInheritedHandles boolean
|
||||
|
||||
Revision 1.19 1999/08/25 13:57:55 michael
|
||||
|
Loading…
Reference in New Issue
Block a user