Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!malgudi!uoft02.utoledo.edu!grx0736 From: grx0736@uoft02.utoledo.edu Newsgroups: comp.unix.internals Subject: C program to get pid of a process Message-ID: <1991Apr25.121647.3331@uoft02.utoledo.edu> Date: 25 Apr 91 12:16:46 EST Lines: 21 unix gurus, i would like to get pid of a running process without using "ps". I know the name of the running process. I intend to this thru' a C program (without giving a "system" call and running shell script in it) which could use some library functions to get information about the pid of a running process. the system i am working on is Sun386i with SunOS 4.0.2 I believe kvm_open, kvm_nextproc etc. are the library functions to be used to get such information. Don't know how to use these functions though. In short, i am looking for something like get_process_id("process_name"); any info. would be highly appreciated. sunil kulkarni