From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.devel Subject: Re: Bug in Guile's Posix Networking Date: Sat, 12 Feb 2011 20:22:57 -0500 Message-ID: References: <877hdb76cq.fsf@vir.lan> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1297560195 26085 80.91.229.12 (13 Feb 2011 01:23:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 13 Feb 2011 01:23:15 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Feb 13 02:23:11 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PoQgA-0007Ge-Ua for guile-devel@m.gmane.org; Sun, 13 Feb 2011 02:23:11 +0100 Original-Received: from localhost ([127.0.0.1]:34922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PoQgA-0004yd-FA for guile-devel@m.gmane.org; Sat, 12 Feb 2011 20:23:10 -0500 Original-Received: from [140.186.70.92] (port=56936 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PoQfz-0004wQ-64 for guile-devel@gnu.org; Sat, 12 Feb 2011 20:23:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PoQfy-0008G8-6P for guile-devel@gnu.org; Sat, 12 Feb 2011 20:22:59 -0500 Original-Received: from mail-gw0-f41.google.com ([74.125.83.41]:50621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PoQfx-0008G3-Qa for guile-devel@gnu.org; Sat, 12 Feb 2011 20:22:58 -0500 Original-Received: by gwj22 with SMTP id 22so1791046gwj.0 for ; Sat, 12 Feb 2011 17:22:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=aobv47IQVunzZ2Qprc5Z/UbDudLHVqy0rfFXIBJmdx8=; b=FPQ0Oo+WY8oFxjAZurkxoa/7mYpwYKOXCgvzaLNqgEKvO07DOgrXsri+qwAecu3/VY pxXmtwdFNpJ9cJ7rvjB5bDAu+1jix6uM+ljdqd2ZXsPIQEfIxEYK2Ejlov9oFbtTNxRt tT/avMLvRHjZPlkvehNDx0SXf75luJm6insNw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=AbtCTuqd9Gkg1wgn8rlz4psqCFFvhtTniP27LDaPPxT3F4YO/cqX3mFWUj2sV+He4u QSvauIAEcndM7323Q1HHgenA1nMtaLdG6iliQYB81EkMdGJPsW1odXeji75fssuM4/+u +nUZuaM6zn1u3GGQmzLQCdF26AA4WvgM5UK8c= Original-Received: by 10.147.32.2 with SMTP id k2mr2863166yaj.37.1297560177262; Sat, 12 Feb 2011 17:22:57 -0800 (PST) Original-Received: by 10.147.40.5 with HTTP; Sat, 12 Feb 2011 17:22:57 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: BI4Qg4lOfJvh3YV2DY95wub66Gs X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.83.41 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11585 Archived-At: Hi, > #x49 is 73 :) If I knew a facepalm emoticon, I would use it now. :) > Could the lseek could be the problem? Maybe, but I suspect not. My man page for lseek says that lseek will fail with ESPIPE if it is called on a socket, and my errno.h defines ESPIPE to be 29, which is the error we got. So that's what's happening there. However, I looked to see where the lseek call was coming from, and it happens in scm_fdes_to_port, on line 564 of fports.c. The lseek is done for the purpose of checking whether the port supports lseek, and when it returns -1, we put an entry into some data structure (port table?) saying that it doesn't support random access. So it looks like that error is actually expected in the port code. Noah