If you use a pipe you can put and read information from the command.
Here is a sample to work with a pipe. This sample looks if a program is already running and returns the number of running programs.
But you can write as well to a pipe like to a file.
int send_emsgs_already_running ()
{
FILE...
Here is a sample to work with a pipe. This sample looks, if a program is already running and returns the number of running programs.
But you can write as well to a pipe like to a file.
int send_emsgs_already_running ()
{
FILE *fps;
const char *ps = "ps -e|grep iaksend_emsgs";
char...
Hi folks!
I've found the source code of "ps" at Debian. But it's quite complicated for simple use!
I think, I will use "ps" and changing its standard output like mentioned by Kenrae.
Thanks!
Does anyone know how to get in Unix a list of the running procces-ID's and names in a C program like "ps" does?
I have searched a lot but found nothing!
The best site I know about programming C under Unix is:
http://www.cs.cf.ac.uk/Dave/C/CE.html
There you'll find a lot of useful things and all about threads!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.