[Lazarus] Process ID

J├╝rgen Hestermann juergen.hestermann at gmx.de
Thu Sep 13 17:22:32 CEST 2012

Am 2012-09-13 10:11, schrieb Michael Schnell:
> IMHO its easier and more straight forward to do the functionality of "pidof" directly in pascal code:
> - do a loop with a findnext() to handle all directories within "/proc"
>  - in each of them test if a file "cmdline" exists
>  - read cmdline in a staring
>  - if this denotes the process you mean to access the directory name is the PID
Oh my god!
Yet another approach of ransacking the whole disk.
This time just to get a process ID.
Is that state of the art software developement?
There is no other way doing it on Linux?

More information about the Lazarus mailing list