Browse Source

* Fixed passing of command without parameters to Exec() to not include
a space after the executable name

peter 24 years ago
parent
commit
ef0a68a972
1 changed files with 9 additions and 2 deletions
  1. 9 2
      rtl/unix/dos.pp

+ 9 - 2
rtl/unix/dos.pp

@@ -326,7 +326,10 @@ Begin
   if pid=0 then
   if pid=0 then
    begin
    begin
    {The child does the actual exec, and then exits}
    {The child does the actual exec, and then exits}
-     Execl (Path+' '+ComLine);
+     if ComLine='' then
+      Execl(Path)
+     else
+      Execl(Path+' '+ComLine);
    {If the execve fails, we return an exitvalue of 127, to let it be known}
    {If the execve fails, we return an exitvalue of 127, to let it be known}
      ExitProcess(127);
      ExitProcess(127);
    end
    end
@@ -877,7 +880,11 @@ End.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.9  2001-07-30 21:38:55  peter
+  Revision 1.10  2001-09-22 11:17:13  peter
+    * Fixed passing of command without parameters to Exec() to not include
+      a space after the executable name
+
+  Revision 1.9  2001/07/30 21:38:55  peter
     * m68k updates merged
     * m68k updates merged
 
 
   Revision 1.8  2001/07/12 12:42:39  marco
   Revision 1.8  2001/07/12 12:42:39  marco