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] Test case 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: - 4613012db1d911f80897f9446a49de817b2c4c47 - 9f389e35674f5b086edd70ed524ca0f287259725 - e9193d60d363e4dff75ff6d43a48f22be26d59c7