(Mac OS, fpc compiler, not in Lazarus).
What I have now:
CMD := 'open /Users/alanB/Pascal/cpoper';
R := fpSystem(CMD);
I'm actually invoking 4 instances of cpoper at a time and would like each to know "which" it is so it can read from the correct named pipe.
I currently hack this by passing a name via a file to each, waiting for it to erase the file (as it's read the parameter), then the next and so on. This way each cpoper instantiation can read from the correct pipe ... (these instances each work in parallel on data in 4 separate external drives...).
Anyhoo, what I'd prefer to do is pass the "which" info to each instantiation in the "open" CMD.
I've tried:
CMD := 'open /Users/alanbrowne/Pascal/cpoper --args A1';
but then the fpsystem call fails to run cpoper. I've tried variations on that call (wrapping in ' and " and so on in many variations) but simply cannot get the parameter over to cpoper instances.
On the cpoper end I hope to simply do: Vol := Paramstr(1); //the passed parameter names the volume to be worked on.
Thx,
A