#!/bin/sh
#
# packageWithPID - given a PID passed in as arg 1 return the package that is
#		   associated with it.
#


pid="$1"

if [ ! -d "/proc/$pid" ]
then
	echo "No process found matching PID: $pid"
fi

# Assuming Linux with /proc so override on SunOS, UnixWare ...

cmd_path=`/bin/ls -l /proc/$pid/exe | awk '{print $11}'`

packageWithExecutable $cmd_path
