Mac OS X: Fix getProcessName() to avoid assertion failure in truncate
Mac OS X: Fix getProcessName() to avoid assertion failure in truncate

Apparently _NSGetExecutablePath doesn't actually set the len field in
the case of successfully copying a value to buf. In this case, the
value in buf is properly terminated, so we can just use strlen to find
a legal value to use when calling truncate.

swq0553/apitrace,surround-io/apitrace,apitrace/apitrace,schulmar/apitrace,joshua5201/apitrace,swq0553/apitrace,joshua5201/apitrace,tuanthng/apitrace,swq0553/apitrace,EoD/apitrace,tuanthng/apitrace,swq0553/apitrace,apitrace/apitrace,PeterLValve/apitrace,EoD/apitrace,apitrace/apitrace,joshua5201/apitrace,trtt/apitrace,PeterLValve/apitrace,apitrace/apitrace,surround-io/apitrace,tuanthng/apitrace,schulmar/apitrace,surround-io/apitrace,EoD/apitrace,joshua5201/apitrace,trtt/apitrace,swq0553/apitrace,trtt/apitrace,EoD/apitrace,trtt/apitrace,surround-io/apitrace,schulmar/apitrace,EoD/apitrace,tuanthng/apitrace,PeterLValve/apitrace,schulmar/apitrace,tuanthng/apitrace,schulmar/apitrace,PeterLValve/apitrace,surround-io/apitrace,joshua5201/apitrace,trtt/apitrace