stdin - seek() issue on Linux.

Paul Jackson pj at engr.sgi.com
Wed Apr 24 15:40:42 EDT 2002


The seek semantics are lower than the stdio package.  They are
found in the semantics of the kernel.  Look at the open(2)
and lseek(2) man pages on most any Unix or Linux or Posix
emulation thereof.

Seek on a device that can seek is ok - though perhaps of no
affect to subsequent writes if the open was in append mode
(note that such a seek does affect subsequent reads, and hence
at the time of the seek there is no cause for error).  Seek on
a device (such as a pipe) that can't seek is an error.
-- 
-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj at sgi.com> 1.650.933.1373



More information about the Python-list mailing list