>---------------------------------------------------------------------- 
> (0003753) shware_systems (reporter) - 2017-06-06 12:14
> http://austingroupbugs.net/view.php?id=1142#c3753 
>---------------------------------------------------------------------- 
>While this looks reasonable, the restriction on pread() and pwrite() of not
>disturbing the seek position is problematic. It means an effective
>dup();lseek();read() or write();close() sequence occurs on each invoke.


This doesn't make sense: dup() creates a file pointer with:

         o    same file pointer (that is, both  file  descriptors
              share one file pointer)

lseek() on a dup()'ed file  will move the lseek on the original file 
pointer as well.

(That makes it possible to write an "lseek(1)" utility which can be used to
change the file pointer for inherited file descriptors)

Casper

Reply via email to