You can run lsof -p with a comma-delimited list of PIDs — but you can also transform the pidof outputĀ into a comma separated list of PIDs. Which means you can run lsof for all of the PIDs associated with a specific program. In my case, it’s rsync …
lsof -p “$(pidof rsync | tr ‘ ‘ ‘,’)”