Add pid2command function

Signed-off-by: Zlatozar Zhelyazkov <zlatozar@gmail.com>