pike.git / src / modules / _Stdio / buffer.cmod

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:950:    /* lock this object. */    while( sz > written && nbytes )    {    ssize_t rd = MINIMUM(MINIMUM(sz-written,4096),nbytes);    unsigned char *ptr = io_read_pointer( io );    ssize_t res;    res = fd_write( fd->box.fd, ptr, rd );    if( res == -1 && errno == EINTR )    continue;    if( res <= 0 ) { +  fd->my_errno = errno;    if (!written) written = -1;    break;    }    io_consume( io, res );    written += res;    nbytes-=res;    }    fd->box.revents &= ~(PIKE_BIT_FD_WRITE|PIKE_BIT_FD_WRITE_OOB);    if(!SAFE_IS_ZERO(&fd->event_cbs[PIKE_FD_WRITE])    && fd->box.backend)