Bash at least sets the environment variable "_" to the name of the new process. You could try that.

As far as ps goes, the way ps gets information depends on the version of unix. Linux and some others now lift the information out of a "proc" filesystem. Others may be using a special system call. So, I don't know of any portable way to get a process name other than parsing ps output. 8(

David "Lord Beatnik"