[fpc-pascal] Linux - ExecuteProcess versus fpSystem

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Sep 8 08:20:22 CEST 2011

I can't really answer you regarding why ExecuteProcess doesn't work.
But just wanted to ask: Have you thought of trying TProcess instead? I
normally execute any external programs via TProcess with good results
- no matter the platform.

  - Graeme -

On 08/09/2011, brian <brian at meadows.pair.com> wrote:
> Reinforcing the subject, this is using Linux - to be specific, FPC
> 2.4.2-0 under 64 bit Mint 9.
> I'm trying to convert a large number of MP3 files to Ogg Vorbis.
> This is a two step process, first I run mpg321 to switch them to a
> .wav file, then oggenc to convert to a .ogg
> 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?
> Thanks,
> Brian.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

  - Graeme -

fpGUI - a cross-platform Free Pascal GUI toolkit

More information about the fpc-pascal mailing list