mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 12:39:38 +01:00 
			
		
		
		
	* additional fixes for ExecuteProcess - running of DOS programs in current directory and proper closing of the created queue
git-svn-id: trunk@19323 -
This commit is contained in:
		
							parent
							
								
									ceecda9d2e
								
							
						
					
					
						commit
						f13c5fae05
					
				@ -669,7 +669,13 @@ begin
 | 
			
		||||
 FillChar (SD, SizeOf (SD), 0);
 | 
			
		||||
 SD.Length := SizeOf (SD);
 | 
			
		||||
 SD.Related := ssf_Related_Child;
 | 
			
		||||
 SD.PgmName := PChar (Path);
 | 
			
		||||
 if FileExists (Path) then
 | 
			
		||||
(* Full path necessary for starting different executable files from current *)
 | 
			
		||||
(* directory. *)
 | 
			
		||||
  CommandLine := ExpandFileName (Path)
 | 
			
		||||
 else
 | 
			
		||||
  CommandLine := Path;
 | 
			
		||||
 SD.PgmName := PChar (CommandLine);
 | 
			
		||||
 if ComLine <> '' then
 | 
			
		||||
  SD.PgmInputs := PChar (ComLine);
 | 
			
		||||
 SD.InheritOpt := ssf_InhertOpt_Parent;
 | 
			
		||||
@ -694,7 +700,9 @@ begin
 | 
			
		||||
       DosCloseQueue (HQ);
 | 
			
		||||
       DosFreeMem (PCI);
 | 
			
		||||
       FreeMem (ObjNameBuf, ObjBufSize);
 | 
			
		||||
      end;
 | 
			
		||||
      end
 | 
			
		||||
     else
 | 
			
		||||
      DosCloseQueue (HQ);
 | 
			
		||||
    end
 | 
			
		||||
   else
 | 
			
		||||
    DosCloseQueue (HQ);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user