This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]