From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#13018: fport_fill_input should handle EINTR Date: Wed, 13 Mar 2013 12:44:13 +0100 Message-ID: <87sj3zh6cy.fsf@pobox.com> References: <87vccqnnr9.fsf@dimension8.tehua.net> <87ehjc5fh7.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1363175113 3153 80.91.229.3 (13 Mar 2013 11:45:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Mar 2013 11:45:13 +0000 (UTC) Cc: 13018@debbugs.gnu.org, Aidan Gauland To: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Mar 13 12:45:37 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UFk7l-0008Ev-3B for guile-bugs@m.gmane.org; Wed, 13 Mar 2013 12:45:37 +0100 Original-Received: from localhost ([::1]:48415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFk7O-0004ZF-O2 for guile-bugs@m.gmane.org; Wed, 13 Mar 2013 07:45:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFk7E-0004Uw-WB for bug-guile@gnu.org; Wed, 13 Mar 2013 07:45:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFk77-0000ZN-Fn for bug-guile@gnu.org; Wed, 13 Mar 2013 07:45:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46377) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFk77-0000ZJ-Bs for bug-guile@gnu.org; Wed, 13 Mar 2013 07:44:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UFk8A-0004bk-5Y for bug-guile@gnu.org; Wed, 13 Mar 2013 07:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 13 Mar 2013 11:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13018 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 13018-submit@debbugs.gnu.org id=B13018.136317512617647 (code B ref 13018); Wed, 13 Mar 2013 11:46:02 +0000 Original-Received: (at 13018) by debbugs.gnu.org; 13 Mar 2013 11:45:26 +0000 Original-Received: from localhost ([127.0.0.1]:50480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFk7Z-0004aa-ND for submit@debbugs.gnu.org; Wed, 13 Mar 2013 07:45:25 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:58078 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFk7W-0004aP-Qo for 13018@debbugs.gnu.org; Wed, 13 Mar 2013 07:45:23 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 95790B139; Wed, 13 Mar 2013 07:44:16 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=v12QpgrJks2P QagTL1Xm4fjv+F4=; b=nUUeIOrB+fl0zL2nkTDF65eMr1sQtdya6bp2cn2rJhim smisDdi5DDPfgR9sQQrthzGO9tIz+RWQWkz5HR5AYe4u33zjU7C95xuw/nhhFBsU pH4ZXSgNTcTXt7XN8waJLwu1JfLl0Itr3BQmKJQGGiU+DC4NWmwM36yS5CZuOgI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=qMSYFz QJhRho5rbDFm10PPjEOlGzuCc57e61nUVvx5kptwYNFoUVxsxEB5/PzfphK/ypg3 t4lPmzeV/unx8T/OMQJciJp2hi8LCyLsbO0yzLgK4b9RJEIYjBaweEJ22nONTeyf +joJRJKmIxloU0fYfFpB7cRNb9QLVObRZ2jgw= Original-Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 8BA11B138; Wed, 13 Mar 2013 07:44:16 -0400 (EDT) Original-Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id CF2CEB137; Wed, 13 Mar 2013 07:44:15 -0400 (EDT) In-Reply-To: <87ehjc5fh7.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Thu, 29 Nov 2012 21:19:48 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Pobox-Relay-ID: 554B1BBA-8BD3-11E2-A0CC-59240E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6948 Archived-At: On Thu 29 Nov 2012 21:19, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Aidan Gauland skribis: > >> fport_fill_input should handle an EINTR error from 'read', >> and restart the read if that happens. >> >> by default on some systems, signals cause 'read', 'write', >> and many other system calls to abort and return an EINTR >> error. >> >> basically, at the POSIX level, every call to 'read' has to >> be within a little loop that takes care of the EINTR >> problem. > > =E2=80=98fport_fill_input=E2=80=99 does this: > > SCM_SYSCALL (count =3D read (fp->fdes, pt->read_buf, pt->read_buf_size)= ); > > and SCM_SYSCALL does that: > > # ifdef EINTR > # if (EINTR > 0) > # define SCM_SYSCALL(line) \ > do \ > { \ > errno =3D 0; \ > line; \ > if (errno =3D=3D EINTR) \ > { \ > SCM_ASYNC_TICK; \ > continue; \ > } \ > } \ > while(0) > # endif /* (EINTR > 0) */ > # endif /* def EINTR */ I get the feeling the EINTR is coming from somewhere else -- like the ASYNC_TICK. The sigaction could cause a thunk to run there. Aidan, do you have a test case? Andy --=20 http://wingolog.org/