On 09/13/2012 07:36 AM, Kaj Mikkelsen wrote:
If I understand your question correct, you are asking for a lazarus
function.
I don't think that exists.
But you can use the TProcess to execute a linux command and grab the output.
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
-Michael
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus