When retrying a write() after an EINTR error on unix, be sure to also

rerun the previous lseek().  Ticket [e59bdf6116036a]

FossilOrigin-Name: 21452f3ae6b5882b03c7cc41e661c7b8144cc3df
This commit is contained in:
drh
2011-08-19 14:54:12 +00:00
parent d5f12cd54d
commit bd1e50c920
4 changed files with 22 additions and 20 deletions
+1 -1
View File
@@ -325,6 +325,7 @@ static int ts_pread64(int fd, void *aBuf, size_t nBuf, off_t off){
*/
static int ts_write(int fd, const void *aBuf, size_t nBuf){
if( tsIsFailErrno("write") ){
if( tsErrno("write")==EINTR ) orig_write(fd, aBuf, nBuf/2);
return -1;
}
return orig_write(fd, aBuf, nBuf);
@@ -671,4 +672,3 @@ int SqlitetestSyscall_Init(Tcl_Interp *interp){
return TCL_OK;
}
#endif