delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-developers-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-developers-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin-developers/> |
List-Post: | <mailto:cygwin-developers AT cygwin DOT com> |
List-Help: | <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
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 |
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: | <FC169E059D1A0442A04C40F86D9BA760014C42@itdomain003.itdomain.net.au> |
X-MS-Has-Attach: | |
X-MS-TNEF-Correlator: | |
From: | "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au> |
To: | <cygwin-developers AT cygwin DOT com> |
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.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |