bytes_write = write(fd_core_file, buffer, bytes_read);
if (bytes_read != bytes_write) {
+ if (bytes_write < 0 && errno == ENOSPC)
+ continue;
fprintf(stderr, "socket_request_kernel: write to core file failed (read=%zd, write=%zd): %m\n",
bytes_read, bytes_write);
goto out;
bytes_write = write(fd_core_file, buffer, bytes_read);
if (bytes_read != bytes_write) {
+ if (bytes_write < 0 && errno == ENOSPC)
+ continue;
fprintf(stderr, "write failed for fd %d: %m\n", fd_core_file);
goto out;
}
bytes_write = write(fd_core_file, buffer, bytes_read);
if (bytes_read != bytes_write) {
- fprintf(stderr, "socket test: write to core file failed (read=%zd, write=%zd): %m\n",
- bytes_read, bytes_write);
+ if (bytes_write < 0 && errno == ENOSPC)
+ continue;
+ fprintf(stderr, "socket test: write to core file failed (read=%zd, write=%zd): %m\n", bytes_read, bytes_write);
goto out;
}
}
goto done;
ssize_t bytes_write = write(fd_core_file, buffer, bytes_read);
if (bytes_write != bytes_read) {
+ if (bytes_write < 0 && errno == ENOSPC)
+ continue;
fprintf(stderr, "Worker: write() failed (read=%zd, write=%zd): %m\n",
bytes_read, bytes_write);
goto out;