If you just want to read the (text) output of a command, you can use
popen, ie:
Code:
FILE *f = popen("pidof teste", "r");
char buf[256];
fgets(buf, sizeof(buf), f);
If you wanted to do this purely in C, you would have to do the process list search yourself using the
process information, but that is more than just a few lines of code.