OS functions for process list

I'm currently fixing a bug in a C program in which I need to check to make sure another specific application is up and running before continuing.

Are there any SunOS API functions that can provide me with a list of currently running processes on the system? I'd like to avoid using 'ps' with a system() call.

You would need to scan the /proc directory. The api is just readdir.