STINNER Victor <victor.stin...@haypocalc.com> added the comment:

"... A negative file offset may be valid for some devices in some 
implementations.

The POSIX.1-1990 standard did not specifically prohibit lseek() from returning 
a negative offset. Therefore, an application was required to clear errno prior 
to the call and check errno upon return to determine whether a return value of 
( off_t)-1 is a negative offset or an indication of an error condition. The 
standard developers did not wish to require this action on the part of a 
conforming application, and chose to require that errno be set to [EINVAL] when 
the resulting file offset would be negative for a regular file, block special 
file, or directory."

Extract of:
http://pubs.opengroup.org/onlinepubs/009695399/functions/lseek.html

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12545>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to