more generic method for extracting PID of current
Merge pull request #1 from hecatonchire/dev

more generic method for extracting PID of current