[fpc-pascal] Linux - ExecuteProcess versus fpSystem

brian brian at meadows.pair.com
Thu Sep 8 00:28:50 CEST 2011


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.



More information about the fpc-pascal mailing list