#include #include #include #include #include char path[] = "eagain.sock"; char spam[0xffff0]; int main() { int sock = socket(AF_UNIX, SOCK_STREAM, 0); fcntl(sock, F_SETFL, O_NONBLOCK); struct sockaddr_un addr; addr.sun_family = AF_UNIX; int i = 0; while (1) { addr.sun_path[i] = path[i]; if (path[i] == 0) break; i += 1; } connect(sock, (struct sockaddr*)&addr, sizeof(addr)); //shutdown(sock, SHUT_WR); for (i = 0; i < 9999; i += 1) { int result = write(sock, spam, 0xffff); if (result < 0) exit(1); } }