[Lazarus] Process ID

Reinier Olislagers reinierolislagers at gmail.com
Thu Sep 13 10:24:28 CEST 2012


On 13-9-2012 10:09, Graeme Geldenhuys wrote:
> On 13/09/12 08:42, Mark Morgan Lloyd wrote:
>> i)   That the ps binary is available.
> 
> So be fair, I don't think I have ever come across a Linux distro that
> doesn't include the ps binary as standard. And I have used Linux since
> 1996. Even *BSD and *Solaris include the ps binary as standard too.
> 
> So I think it is quite safe to assume the ps binary will be available on
> a Linux system.

Agreed.

The fact that these pesky command line arguments do differ may be an
*ahem* argument to wrap up this functionality in an FPC library function
so the user does not need to remember/fiddle with/update his code for
the various differences and the code will run on e.g. OSX, Linux,
Solaris, AIX without modifications.

... and if, for some reason, ps functionality is implemented in another
way (e.g. no ps but /proc filesystem is available), obviously this
library function could be extended...

Of course, this all depends on reliable OS detection etc, which, looking
at earlier discussions here and going from experience, is not that easy
either.




More information about the Lazarus mailing list