[fpc-pascal] Linux - ExecuteProcess versus fpSystem

Marco van de Voort marcov at stack.nl
Thu Sep 8 08:56:43 CEST 2011


In our previous episode, brian said:
> What's driving me crazy is that running the two commands via 
> ExecuteProcess does the first step OK, but oggenc fails with an exit 
> code of 1, operation not permitted.
> 
> If I replace the ExecuteProcess with a call to fpSystem, concatenating 
> the CommandString and ParamString with a space as separator and 
> passing that as the command, both steps work just fine.
> 
> I've tried putting a Delay(5000) between the two commands using 
> ExecuteProcess, just in case there was some type of problem with data 
> still being written from a cache. No difference whatever.
> 
> This is reproducible on a whole batch of files, and yes, I've checked 
> all the file permissions.
> 
> It's got to be something obvious, or some quirk of Linux programming 
> that I haven't met up with yet (I'm still a novice with FreePascal and 
> Linux, though I've many years experience with Delphi and Windows). 
> What am I missing?

First: what does a typical command look like?
second: maybe ogenc is simply faulty and won't work unless directly called
from shell.



More information about the fpc-pascal mailing list