[lazarus] TProcess parameters...

Marco van de Voort marcov at stack.nl
Sat Jun 21 18:46:17 EDT 2003


> > 
> > A first shot here. When you issue ls *.rpm from a shell, the * is expanded
> > 
> > by your shell and it is'nt passed to ls. ls get (in your case) all 1400 
> > files as argument.
> > 
> > What you are excuting is something like ls "*.rpm" and that file does not 
> > exist.
> > 
> > >I've looked at the TProcess code and can't seem to find any problems
> > >there. CommandToList and MakeCommand both seem to return the expected
> > >results. I've concluded the problem may be in CreateProcess... but I
> > >can't seem to run it down.
> > >Any suggestions would be appreciated! :)
> 
> CommandLine:='bash -c "ls /mnt/disk/redhat9/release/*.rpm"';

Don't use bash, (even worse is to hardcode the path to be /bin)

BSD systems sometimes don't have bash (they have sh as default Bourne shell already,
which is enough to run standard scripts). And if they do, it is somewhere else, not
in /bin.

linux.shell() takes care of this IIRC.






More information about the Lazarus mailing list