This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
lseek and sockets/console
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- To: <cygwin-developers at cygwin dot com>
- Date: Tue, 19 Mar 2002 13:13:33 +1100
- Subject: lseek and sockets/console
lseek on stdin returns EBADF at the moment, according to 1003.x it looks
like it should return -1 with errno ESPIPE.
For sockets it returns 0 always, again -1 with errno=ESPIPE is correct.
Likewise for tty's.
I need stdin to return -1, errno ESPIPE so I'll be fixing that up (I'll
submit a patch, I'm not familiar with that bit of source at the moment),
but am seeking thoughts on the rest.
Rob
===
ERRORS
The lseek( ) function shall fail if:
[EBADF] The fildes argument is not an open file descriptor.
[EINVAL] The whence argument is not a proper value, or the resulting
file offset would
be negative for a regular file, block special file, or directory.
[EOVERFLOW] The resulting file offset would be a value which cannot be
represented
correctly in an object of type off_t.
[ESPIPE] The fildes argument is associated with a pipe, FIFO, or socket.