twitter / fatcache

Memcache on SSD
Apache License 2.0
1.3k stars 179 forks source link

pwrite pread need check EINTR? #26

Open jazy333 opened 8 years ago

jazy333 commented 8 years ago

like the following snippet: n = pwrite(fd, slab, size, off); if (n < size) { log_error("pwrite fd %d %zu bytes at offset %"PRId64" failed: %s", fd, size, off, strerror(errno)); return FC_ERROR; }

when n<size ,pread or pwrite may interrupt by signal ,errno is equal to EINTR, it should process on writing,not return an error?