http://bugs.winehq.org/show_bug.cgi?id=28898
--- Comment #52 from William Pettersson william.pettersson+wine@gmail.com 2012-03-23 03:55:06 CDT --- I'll do some more digging tonight, but I think I just got lucky on my couple of tests. I've tried a bunch more, and yeah I'm getting similar things.
I think for "my" way of finding a pid from an inode might have one particular issue. I think that more than one pid can "open" a socket, and by one pid I mean the same process but different threads (maybe). I'm not 100% on this, though.
However, if that is the case, I simply return the smallest unix_pid for a socket inode, and sometimes wine, when converting that to a "wine" pid, throws INVALID_PARAMETER. I'll try changing my code so that if a "conversion" fails, it keeps trying other unix_pids.