Changeset 1663
- Timestamp:
- 02/19/2007 01:52:23 PM (1 year ago)
- Files:
-
- branches/lighttpd-1.4.x/src/mod_fastcgi.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/lighttpd-1.4.x/src/mod_fastcgi.c
r1607 r1663 2368 2368 */ 2369 2369 if (ioctl(hctx->fd, FIONREAD, &toread)) { 2370 if( errno == EAGAIN ) return 0; 2370 2371 log_error_write(srv, __FILE__, __LINE__, "sd", 2371 2372 "unexpected end-of-file (perhaps the fastcgi process died):", … … 2378 2379 if (toread > 0) { 2379 2380 buffer *b; 2381 chunk *cq_first = hctx->rb->first; 2382 chunk *cq_last = hctx->rb->last; 2380 2383 2381 2384 b = chunkqueue_get_append_buffer(hctx->rb); … … 2384 2387 /* append to read-buffer */ 2385 2388 if (-1 == (r = read(hctx->fd, b->ptr, toread))) { 2386 if (errno == EAGAIN) return 0; 2389 if( errno == EAGAIN ) { 2390 /* roll back the last chunk allocation, 2391 and continue on next iteration */ 2392 buffer_free(hctx->rb->last->mem); 2393 free(hctx->rb->last); 2394 hctx->rb->first = cq_first; 2395 hctx->rb->last = cq_last; 2396 return 0; 2397 } 2387 2398 log_error_write(srv, __FILE__, __LINE__, "sds", 2388 2399 "unexpected end-of-file (perhaps the fastcgi process died):", … … 2397 2408 b->ptr[b->used - 1] = '\0'; 2398 2409 } else { 2410 if( errno == EAGAIN ) return 0; 2399 2411 log_error_write(srv, __FILE__, __LINE__, "ssdsb", 2400 2412 "unexpected end-of-file (perhaps the fastcgi process died):",

