> While researching another problem, I found an issue with a different code
> segment that works fine under 2.0.x. The dumbed down version attached to this
> message will get a socket, and then fork a second process (sender/receiver).
> The processes will connect, send the file "input" to the process (writing to
> "output"), and then exit. Really simple. Works great on the 2.0.35 kernel
> that I wrote it on. With at least 2.1.116pre1 though, I *always* get (through
> perror on the recv() call):
> Resource temporarily unavailable
<grumble> after decoding the bas64 mess, please send readable bug reports
next time </grumble>
The reason is simple.
This is in your program. glibc 2.0 does not define MSG_WAITALL, only
linux/socket.h or glibc 2.1 do, thus this definition is active
#ifndef MSG_WAITALL /* Most Systems don't tend to have this ... */
#define MSG_WAITALL 0x40 /* wait for full request or error */
but in linux/socket.h there is:
#define MSG_DONTWAIT 0x40 /* Nonblocking io */
#define MSG_WAITALL 0x100 /* Wait for a full request */
You're requesting non blocking IO, and EAGAIN is completely correct here.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html