As described in the LKML thread at http://lkml.org/lkml/2008/1/8/444, calling recv() with MSG_PEEK on an AF_UNIX socket only reads a single skb. Wine uses AF_UNIX sockets for its named pipe implementation and runs into this bug. The patch posted at http://lkml.org/lkml/2008/1/10/436 works for me, but probably doesn't handle fd passing correctly, as the mail already mentions.
If this is still seen on modern kernels then please re-open/update
Created attachment 125431 [details]
This still exists on modern kernels (tried 3.5.0-17-generic), it'd be awesome if it could be fixed.
Here's a short Python script to demonstrate the problem. It passes on FreeBSD and Mac OS.
This bug can be resolved with the following commits: