Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ames!vsi1!altos!megadon!clp From: rembo@unisoft.com (Tony Rems) Newsgroups: comp.unix Subject: Re: How to find process name in c Message-ID: <2206@megadon.UUCP> Date: 13 Oct 90 08:37:42 GMT Sender: clp@megadon.UUCP Lines: 14 Approved: clp@megadon.UUCP In-Reply-To: <2190@megadon.UUCP> In article <2190@megadon.UUCP> you write: >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. Well, you can perform the above task in C by, doing a popen("ps -ef", "r"); check the popen man page. Your other alternative is to go digging into the kernel to check the process table. Why do the work when ps has already done it for you? -Tony