mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-19 13:40:59 +08:00
Update.
* rt/aio_misc.c (handle_fildes_io): Imitate the behaviour on other systems which allow using the functions also on non-seekable devices.
This commit is contained in:
parent
3ac3f38099
commit
754549b3be
@ -1,5 +1,9 @@
|
||||
1999-08-06 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* rt/aio_misc.c (handle_fildes_io): Imitate the behaviour on other
|
||||
systems which allow using the functions also on non-seekable
|
||||
devices.
|
||||
|
||||
* resolv/res_send.c (res_send): Recompute timeout for poll for
|
||||
each jump to `wait'.
|
||||
|
||||
|
@ -435,6 +435,16 @@ handle_fildes_io (void *arg)
|
||||
(void *) aiocbp->aiocb.aio_buf,
|
||||
aiocbp->aiocb.aio_nbytes,
|
||||
aiocbp->aiocb.aio_offset));
|
||||
|
||||
if (aiocbp->aiocb.__return_value == -1 && errno == ESPIPE)
|
||||
/* The Linux kernel is different from others. It returns
|
||||
ESPIPE if using pread on a socket. Other platforms
|
||||
simply ignore the offset parameter and behave like
|
||||
read. */
|
||||
aiocbp->aiocb.__return_value =
|
||||
TEMP_FAILURE_RETRY (read (fildes,
|
||||
(void *) aiocbp->aiocb64.aio_buf,
|
||||
aiocbp->aiocb64.aio_nbytes));
|
||||
}
|
||||
else if ((aiocbp->aiocb.aio_lio_opcode & 127) == LIO_WRITE)
|
||||
{
|
||||
@ -450,6 +460,16 @@ handle_fildes_io (void *arg)
|
||||
(const void *) aiocbp->aiocb.aio_buf,
|
||||
aiocbp->aiocb.aio_nbytes,
|
||||
aiocbp->aiocb.aio_offset));
|
||||
|
||||
if (aiocbp->aiocb.__return_value == -1 && errno == ESPIPE)
|
||||
/* The Linux kernel is different from others. It returns
|
||||
ESPIPE if using pwrite on a socket. Other platforms
|
||||
simply ignore the offset parameter and behave like
|
||||
write. */
|
||||
aiocbp->aiocb.__return_value =
|
||||
TEMP_FAILURE_RETRY (write (fildes,
|
||||
(void *) aiocbp->aiocb64.aio_buf,
|
||||
aiocbp->aiocb64.aio_nbytes));
|
||||
}
|
||||
else if (aiocbp->aiocb.aio_lio_opcode == LIO_DSYNC)
|
||||
aiocbp->aiocb.__return_value = TEMP_FAILURE_RETRY (fdatasync (fildes));
|
||||
|
Loading…
x
Reference in New Issue
Block a user