From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: guile-1.8.1 - problems on AMD64 Date: Thu, 19 Oct 2006 19:46:24 +0100 Message-ID: <871wp43zzz.fsf@ossau.uklinux.net> References: <20061010063445.GA30335@basalt.office.altlinux.org> <87slhw60l8.fsf@laas.fr> <20061011110153.GA12594@basalt.office.altlinux.org> <87r6xdher1.fsf@laas.fr> <20061013062617.GD8294@basalt.office.altlinux.org> <873b9sfyx6.fsf@laas.fr> <87vemnca65.fsf@ossau.uklinux.net> <20061016062540.GE17598@basalt.office.altlinux.org> <873b9ou1nw.fsf@laas.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1161283658 20233 80.91.229.2 (19 Oct 2006 18:47:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Oct 2006 18:47:38 +0000 (UTC) Cc: guile-devel@gnu.org, ldv@altlinux.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Oct 19 20:47:35 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GacvG-0002YD-5V for guile-devel@m.gmane.org; Thu, 19 Oct 2006 20:47:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GacvF-0004Lu-My for guile-devel@m.gmane.org; Thu, 19 Oct 2006 14:47:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GacvC-0004Je-T6 for guile-devel@gnu.org; Thu, 19 Oct 2006 14:47:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gacv9-0004EV-I9 for guile-devel@gnu.org; Thu, 19 Oct 2006 14:47:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gacv9-0004EH-BV for guile-devel@gnu.org; Thu, 19 Oct 2006 14:47:11 -0400 Original-Received: from [80.84.72.33] (helo=mail3.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gacv8-0001y6-OD for guile-devel@gnu.org; Thu, 19 Oct 2006 14:47:11 -0400 Original-Received: from laruns (host217-43-46-97.range217-43.btcentralplus.com [217.43.46.97]) by mail3.uklinux.net (Postfix) with ESMTP id A938A40A535; Thu, 19 Oct 2006 18:47:09 +0000 (UTC) Original-Received: from laruns (laruns [127.0.0.1]) by laruns (Postfix) with ESMTP id 651FB6F71F; Thu, 19 Oct 2006 19:46:24 +0100 (BST) Original-To: Stanislav Ievlev In-Reply-To: <873b9ou1nw.fsf@laas.fr> ( =?iso-8859-1?q?Ludovic_Court=E8s's_message_of?= "Mon, 16 Oct 2006 10:04:35 +0200") User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) 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:6166 Archived-At: ludovic.courtes@laas.fr (Ludovic Court=E8s) writes: > I guess the point of this `_FORTIFY_SOURCE' thing is to help catch > errors related to interactions with the kernel (among others). The idea > is that when performing a system call, one _should_ be concerned about > its result. > > In the case of async.c:250, I don't understand whether/how failure of > the `write ()' call should be handled. I think it's writing a byte as an inter-thread signaling mechanism. It's pretty unlikely that a single byte write will be interrupted, but if it is then a retry will be needed, so I think the use of SCM_SYSCALL is correct in principle here. How about this, which is more similarly to the other uses of SCM_SYSCALL in the code? SCM_SYSCALL (rv =3D write (sleep_fd, &dummy, 1)); (Whole patch is below.) Regards, Neil Index: async.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/guile/guile/guile-core/libguile/async.c,v retrieving revision 1.86 diff -u -r1.86 async.c --- async.c 17 Apr 2006 00:05:37 -0000 1.86 +++ async.c 19 Oct 2006 18:46:32 -0000 @@ -241,13 +241,14 @@ if (sleep_fd >=3D 0) { char dummy =3D 0; + int rv; /* Likewise, T might already been done with sleeping here, but interrupting it once too often does no harm. T might also not yet have started sleeping, but this is no problem either since the data written to a pipe will not be lost, unlike a condition variable signal. */ - write (sleep_fd, &dummy, 1); + SCM_SYSCALL (rv =3D write (sleep_fd, &dummy, 1)); } =20 /* This is needed to protect sleep_mutex. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel