http://bugs.winehq.org/show_bug.cgi?id=28898
--- Comment #44 from William Pettersson william.pettersson+wine@gmail.com 2012-03-20 17:54:33 CDT --- Nice pickup. However, I don't know if a patch that calls lsof (amongst other things) will be accepted by wine. I realise that during the first revisions it's easiest to just do that, however I think now that it's working someone will probably have to rewrite the patch to actually read /proc directly. In particular, I know that wine currently does not depend on "lsof" as I had to manually install it on my laptop to get D3 to work.
I'm meant to be at work in 10 minutes, so I'll keep digging later, but we do have the inode, so a simple check in /proc/<PID>/fd/ for a link to "socket:<INODE>" would give the corresponding PID (so we'd have to iterate over all possible PIDs, looking for a specific inode).