How to find process name in c?

Kishore Seshadri kseshadr at quasar.intel.com
Tue Jul 17 04:07:44 AEST 1990


In article <570001 at carter.BCASDL.BOEING.COM>, lyn at carter (     Lyn Stewart      ) writes:
>
>
>Has anyone got a method for finding out if a process is running short of
>"ps -ef | grep processname" in a pipe.  There must be a better way from
>within a c program.
>
>
If you're looking for some kind of a library function, I haven't seen one.
You could do what ps does and look through the proc table, but its 
probably not worth the programming effort unless you're doing this real
often.

Kishore Seshadri
===============================================================================
Kishore Seshadri (Speaking only for myself) Intel Corp., Santa Clara, CA
CSNET: kseshadr at mipos3.intel.com ARPA: kseshadr%mipos3.intel.com at relay.cs.net
UUCP:{amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!kseshadr



More information about the Comp.unix.wizards mailing list