Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Subject: lseek and sockets/console X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 Date: Tue, 19 Mar 2002 13:13:33 +1100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Robert Collins" To: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g2J2OMh04718 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.