Hi, Working on HBASE-4737, we found that the standard way of getting pid / ppid doesn't work on MacOS.
According to N: from http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/ps.1.html could you check if ps -o pid --no-headers -$id works (with $id equals to 1 for example: is should return 1 as it's the pid of the 'init' process, see the '-' before $id) same for ps -o ppid --pid $pId --no-headers With for example 1 for $pId. Should return 0 last is: ps -o comm should show 'java' for java process ------ Here is what I got: zhihyu$ ps -o pid --no-headers -1 ps: illegal option -- - usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]] [-g grp[,grp...]] [-u [uid,uid...]] [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]] ps [-L] ~ zhihyu$ ps -o comm COMM -sh -sh -sh /Users/zhihyu/eclipse/Eclipse.app/Contents/MacOS/eclipse ------ If you have experience with using ps command on Mac, please comment. Thanks
