From unknown Sat Jun 21 03:30:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34860: Probing broken symlinks always involves errors Resent-From: Tim Gesthuizen Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 14 Mar 2019 19:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34860 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 34860@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155259335532227 (code B ref -1); Thu, 14 Mar 2019 19:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Mar 2019 19:55:55 +0000 Received: from localhost ([127.0.0.1]:44081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h4WSJ-0008Ni-DE for submit@debbugs.gnu.org; Thu, 14 Mar 2019 15:55:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h4WSI-0008NV-1B for submit@debbugs.gnu.org; Thu, 14 Mar 2019 15:55:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:48286) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h4WS3-0004gM-G8 for submit@debbugs.gnu.org; Thu, 14 Mar 2019 15:55:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4WS2-00019S-ND for bug-guile@gnu.org; Thu, 14 Mar 2019 15:55:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h4WNq-0002Ib-4K for bug-guile@gnu.org; Thu, 14 Mar 2019 15:51:20 -0400 Received: from sonic308-18.consmr.mail.ir2.yahoo.com ([77.238.178.146]:40407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4WNn-0002FQ-W6 for bug-guile@gnu.org; Thu, 14 Mar 2019 15:51:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1552593067; bh=Cr/w4FNsiHhQDXL7hhcC57d+/EDbNxQm58gsN/S2cfk=; h=From:To:Subject:Date:From:Subject; b=KZpUyoNlmYyQXFjLfoG0tFMRvLO6utcoSywoZQhigi08dMjBNkdqExTkBD75HA5sWyGV4Ly/JCC+9pFI428Kl125yxKDSBhAIbplhmrzSAgPGX0TcEnBIMvsK5AfcmObPAkSBhcVmNNBUxFNp3XfYjZzl04GOBbGBS5UIfm2PG5SreLeXzIVsrLD+QvtysnQuUdTSXwo+Kr5b4QLbwkjlvKe7BZccC0MXDjDLDANS+LcodS+INO4RTio4Qo8LAygkrvvR5hos1GfNHd9B9104g4cTNTsbYGF2xJ2hX+miclkzp+bvbqlF27anJK0ChZBoTie4b4BSmReMx5KKi8E6w== X-YMail-OSG: O5IQ5AAVM1mwzGANGLq7ULBlhnMupoVSQTpRpdEIPwINMMBsRsZiCjil51fiTHO EdHgOOm3Wb1G02QxAQ2DWMrwkoT1u6TmUFz2wT3BFhhsn92OHQsKmEZqo_kC_T88Q3rmgbc.nKPs 0pLmE9hJZcPAtbSp8d4qbb1wuwwSoCuZDss1w6LvRJADTytL4foNVo_EhGnfn04HdVCHxDvVtbH_ JzJBiZ2talH02HCO2b62cTowBwxUipJ3NUO_9u6I0KU8ErGw3SgkGeQqng.V4tnV6OkN9qCuywff x1fHIOYCHtwbqos0r5oaDua0l7pUQgoHRc0ZcnhQmYJiQi_bxeUQ0jw8FmOO06siWJuP3re1lSNj rW7wgVSPDR6kAwJ7n3_Gfzj1MFqolpU3mDWB.F5ZQPC5crbmq6dHu4prOjOW9I4ZWIuDQ8blc3Xr pvSBacc6Vzcp1BBf5dSjH9UBh7QgSbG_zAfxl0LiDIk89N4mKTUl6kpuQGd3vACBADPGC8wykh.i sfhkOCalvLPtyTu2ON60r7f4ooDglWf8y5Cfq5UVhpGrDqxgZap2CxbNZeFlO6RkyOuy9BmjaCpH cTjm5Guz5roS6w7jROwlxOE6iCJStjCJl38HJRRDIvU2NJAVttyxJZ5.PurwIBx2aT1rFcsRdrAS 4cAHsmGhv0v0B0l1_AO1dLUS_9xUtj8Avj20fWg7tG_._3KxyGRULTUFzR8zERpVKjVSfue9BgwT N4puiRxHDTUB_R6cChFxiHimP0B7kiliVKXU3gOFrm5uGkhe6WHzh5vewg_2vk1KQCbmf1iRUYPz N6QKbSVfZvXiJI9HSgYCoFFeGsnlw2nE_NXX0lWZvUVdsSUwuT5Li03X5An9BwsxiPvzLb_wPmF0 sPTK8mfk.vgXtsIcSJxTIkpUWjzVs942O2v3GRvGhD3ORhpCb6EcJcfbr_1SL4HjbgAwGMB4iaEn _P9QiRYpHQZW5kTwFlG5N2sQJ_0bOfj__zhAnba.Y30qq34XHwR7i8WcvAEs_mWDQMfoU6RsxZqI RZ9fe_awYqhdQ9ttQBDx2CvvP5cY- Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ir2.yahoo.com with HTTP; Thu, 14 Mar 2019 19:51:07 +0000 Received: from ip5f5acae0.dynamic.kabel-deutschland.de (EHLO finkpad) ([95.90.202.224]) by smtp430.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 149d7faaea3c273f9517f8a742722a13 for ; Thu, 14 Mar 2019 19:51:05 +0000 (UTC) User-agent: mu4e 1.0; emacs 26.1 From: Tim Gesthuizen Date: Thu, 14 Mar 2019 20:50:57 +0100 Message-ID: <87ef79z13y.fsf@yahoo.de> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 77.238.178.146 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Hi, I wrote a little application that tries to probe whether a symlink exists. The `stat` function has an undocumented optional parameter that lets stat return #f when the file does not exist. With this argument one can probe for any files excluding broken symlinks. lstat does not offer this argument. Therefore I needed to use guard-expressions around lstat to probe for broken symlinks. So probing broken symlinks relies on errors in the control flow and is not straight forward. Maybe we should add the optional argument that `stat` has and document the arguments for both commands. I am using guile 2.2.4. Tim. From unknown Sat Jun 21 03:30:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34860: Probing broken symlinks always involves errors Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 10 Apr 2019 19:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34860 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Tim Gesthuizen Cc: 34860@debbugs.gnu.org Received: via spool by 34860-submit@debbugs.gnu.org id=B34860.15549242711812 (code B ref 34860); Wed, 10 Apr 2019 19:25:02 +0000 Received: (at 34860) by debbugs.gnu.org; 10 Apr 2019 19:24:31 +0000 Received: from localhost ([127.0.0.1]:53542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hEIpi-0000TA-Nc for submit@debbugs.gnu.org; Wed, 10 Apr 2019 15:24:30 -0400 Received: from world.peace.net ([64.112.178.59]:54810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hEIpf-0000Sv-K8 for 34860@debbugs.gnu.org; Wed, 10 Apr 2019 15:24:29 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hEIpZ-0000YO-E0; Wed, 10 Apr 2019 15:24:21 -0400 From: Mark H Weaver References: <87ef79z13y.fsf@yahoo.de> Date: Wed, 10 Apr 2019 15:22:49 -0400 In-Reply-To: <87ef79z13y.fsf@yahoo.de> (Tim Gesthuizen's message of "Thu, 14 Mar 2019 20:50:57 +0100") Message-ID: <878swhslzv.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Tim, Tim Gesthuizen writes: > I wrote a little application that tries to probe whether a symlink > exists. The `stat` function has an undocumented optional parameter that > lets stat return #f when the file does not exist. With this argument one > can probe for any files excluding broken symlinks. > lstat does not offer this argument. Therefore I needed to use > guard-expressions around lstat to probe for broken symlinks. > > So probing broken symlinks relies on errors in the control flow and is > not straight forward. I would suggest using 'false-if-exception', which is documented in the manual: (false-if-exception (lstat file-name)) That seems fairly straightforward and readable, no? I'm not sure that errors in the control flow is necessarily something that we need to avoid in cases like this. It's true that there's some minor expense involved in handling the exception, but I suspect it's lost in the noise compared with the expense of the 'lstat' system call itself. Do you see a practical problem with this approach? > Maybe we should add the optional argument that `stat` has and document > the arguments for both commands. I'm not strongly opposed to the idea, but it raises the question of what to do with the corresponding C API function 'scm_lstat'. We certainly can't change the number of arguments to 'scm_lstat' in the 2.2.x series, because that would break ABI compatibility. We could change it in the next release series, but that would require source-level changes in any code that uses 'scm_lstat'. Alternatively, we could keep 'scm_lstat' unchanged, and add a new internal C function with the optional argument, bound to Scheme 'lstat'. Anyway, I'm inclined to simply suggest using 'false-if-exception'. What do you think? Regardless, thanks for bringing my attention to the fact that 'scm_stat' is incorrectly documented in the manual. It asserts that there's only one argument to that function, but in fact there are now two. That's definitely a bug. Regards, Mark From unknown Sat Jun 21 03:30:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34860: Probing broken symlinks always involves errors Resent-From: Tim Gesthuizen Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 11 Apr 2019 18:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34860 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Mark H Weaver Cc: 34860@debbugs.gnu.org Received: via spool by 34860-submit@debbugs.gnu.org id=B34860.155500592519603 (code B ref 34860); Thu, 11 Apr 2019 18:06:02 +0000 Received: (at 34860) by debbugs.gnu.org; 11 Apr 2019 18:05:25 +0000 Received: from localhost ([127.0.0.1]:55148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hEe4i-000567-RR for submit@debbugs.gnu.org; Thu, 11 Apr 2019 14:05:25 -0400 Received: from sonic304-22.consmr.mail.ir2.yahoo.com ([77.238.179.147]:39821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hEe4f-00055q-Kt for 34860@debbugs.gnu.org; Thu, 11 Apr 2019 14:05:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1555005914; bh=9o5gz3c2AhRwTG6PnUIijOkPMP2EYlEt64mMjRwOTIg=; h=References:From:To:Cc:Subject:Date:From:Subject; b=UjISJcA5Tro+d8esJAlCIA8j9Q3EeIxr5Smli3W8giEZPi9rO9SycbLjHDdW+XpkCR21NFNlm8TkqUHEJNV9zeDzOD9MNA4SJYJfJQ3wy2Torh9l9lwO/CMQW046cwBkbswWq8t8XreRtf4dOj4NwWtR1r/5IWgVlAx4hSm/qdU0EaFm3/9MSkTTEMXengUnyhRWi8rn6gw9Rc4JQ4fuJ6JLQ9coVdzdma5RtbmL1N6XnFQPqaTt7aV6+MiVVtySInP5VdxhAVtwZ6niPanzEh4czyXFLDJ/PuQ1S1UMIrNttkEw1CrB28rRTb5f/dCBKvmLpVyoa3YRBpdzfGla7A== X-YMail-OSG: A6QqJ.4VM1lFGr_GFMBHjxdI3DrimvOU2ytrygYcY9NMNqIFy9W.7DgoRNmH9qT ek2sLyEpPHFQ5gYRxDYqeoY5bmtSUe12QkOkIG1jG8Lh0a6UKsqDpUxw3LgxI9XtZRFCWPiI9WLl QHoCcp.qboqyWEKMgdoO0HBjLkf64IUKX5W1YcjXh8PbfETv1a6Uo3uOi2yxu3ALXqAzTGBmaFE. 4g2We6AlTRqb4jFdJuczo1UoUps8nKSLIXPJkZEMtDWp3Kp.N5XSfRmcF4_BnRzWBxwZFh559S7h Rqf92W33MAkitbDusB_leoXsdLNnvnF3iO5u5f_.n_8Qqzj0yP43ydcVHFAXt1UdJxKdR1bGPuxQ hW0JRU5r7L09swC1MREeo5ZpyaN0E8dkeNrmLkjsU649WN.dXDiXLyA8aBIrSz0GrxxDB0nrizbm eRumXQmtddW.1EcOvKMAF173VKFWKVXP8Tp_GzaxFu8Lt9wfBj9SD6t00R5ceMlRK0mOU04ythl5 aln3uHLgPOOWZ3o7gx_j7AJIAI8D5OCqIYV9vdrR5YAa8ExlPJf49WvtHWkBDTXJu.IBiikA2FBS C.nTXwGiUk9_kyDTin2mhJIVaMi9aOeCYzSiC0vVjDGokC3OsIj1uOSPEUM9o3612d4Mj.OczkyC kU9ay5Qa.zoMJNsBuOtPxn77CkkPDyTDVVXO68vmSux5AO3_JgllVXRSEvTPghx3X51PJNIYWNPQ STaOauByxrBEyGt5GyP5ybFyZwEA3TDAoFtRnup31yON3NmN10ldVdD3NqXU3N.9gqsbCVG5eNAJ nQDy2s4Twx1B9mzi3Q3aRyeCv1a2i3kxhWKHOGOY1qseBtHdrQpxmfm.Cru3sUAlf6lo6U1z4DRr UTKInVrKS9b_Ds.JOqA35jaTmevVaKYyqsJxKeyf6XcyHHqx2FusXrX.lyJVKJbHEk_zAD6oEwDU ikWZMZE1fw.WKTXbggsB.Galy1wGJ1dxRsxskwf6nXf_GX98vVFHbaF3wx2jv9N40YqEhK_62bKR Z81KKrqevVLl3mFLfDMHAGUuJtz.nKg4ETsQ0LAx1MngVIvvbMwEbGq_G8wmif4FB Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Thu, 11 Apr 2019 18:05:14 +0000 Received: from ip5f5acaf3.dynamic.kabel-deutschland.de (EHLO finkpad) ([95.90.202.243]) by smtp407.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 356ac3abeb829692c02944a996ac001c; Thu, 11 Apr 2019 18:05:11 +0000 (UTC) References: <87ef79z13y.fsf@yahoo.de> <878swhslzv.fsf@netris.org> User-agent: mu4e 1.0; emacs 26.1 From: Tim Gesthuizen In-reply-to: <878swhslzv.fsf@netris.org> Date: Thu, 11 Apr 2019 20:05:09 +0200 Message-ID: <87ef68v2ne.fsf@yahoo.de> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi Mark, Mark H Weaver writes: > Anyway, I'm inclined to simply suggest using 'false-if-exception'. > > What do you think? I'm fine with this solution. My point was more about lowering the entry barrier for beginners than performance. If the change breaks ABI it is probably just not worth it. =2D From my point of view we can close the ticket unless you want to keep it open until the documentation for stat is fixed. Tim. =2D----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEKUiC5+8BRKEri5fa0uWPaa77GdUFAlyvgdUACgkQ0uWPaa77 GdWvVQf/QdJ6Mze6jdx3qeFNjcq0hJCdkjykjWQal2m2eFNan+9RgrWUo/oGmJxq 9kVrckRE8lSH0Lh0jy5vhVtf4kBLcEKMB3oHBg7SM/w10nYsqkeZx+hV+MQkKQ3O FomSddVDwa1R2aCHOJ55anHehvY5ICe2iQnASRPV4S/1h29b4cqg6W8OoKAiB2XR GP7xfJ2s9y1IUm/0zSaAwpzr+CXcsplZVDgKcERo46/lfovFVsynhFJqNuU6ulBF QJZAZyohH4SYiPQ21zq4r95WAr1UUfm8awJJuv5zgWx7wTcipUomXyINdnV6jEdT bUGnNNOqpmhzzYuP0j+lI3yRqYb2/g=3D=3D =3DJSqx =2D----END PGP SIGNATURE----- From unknown Sat Jun 21 03:30:39 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Tim Gesthuizen Subject: bug#34860: closed (Re: bug#34860: Probing broken symlinks always involves errors) Message-ID: References: <87v9wmrgrn.fsf@gnu.org> <87ef79z13y.fsf@yahoo.de> X-Gnu-PR-Message: they-closed 34860 X-Gnu-PR-Package: guile Reply-To: 34860@debbugs.gnu.org Date: Sun, 30 Jun 2019 19:55:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1561924502-18399-1" This is a multi-part message in MIME format... ------------=_1561924502-18399-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #34860: Probing broken symlinks always involves errors which was filed against the guile package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 34860@debbugs.gnu.org. --=20 34860: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D34860 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1561924502-18399-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 34860-done) by debbugs.gnu.org; 30 Jun 2019 19:54:16 +0000 Received: from localhost ([127.0.0.1]:47329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhftu-0004lk-Sh for submit@debbugs.gnu.org; Sun, 30 Jun 2019 15:54:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhftt-0004lY-R1 for 34860-done@debbugs.gnu.org; Sun, 30 Jun 2019 15:54:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hhftm-0007wx-Pg; Sun, 30 Jun 2019 15:54:07 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=40018 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hhftl-0001CH-Jf; Sun, 30 Jun 2019 15:54:06 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Tim Gesthuizen Subject: Re: bug#34860: Probing broken symlinks always involves errors References: <87ef79z13y.fsf@yahoo.de> <878swhslzv.fsf@netris.org> <87ef68v2ne.fsf@yahoo.de> Date: Sun, 30 Jun 2019 21:54:04 +0200 In-Reply-To: <87ef68v2ne.fsf@yahoo.de> (Tim Gesthuizen's message of "Thu, 11 Apr 2019 20:05:09 +0200") Message-ID: <87v9wmrgrn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 34860-done Cc: Mark H Weaver , 34860-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Tim, Tim Gesthuizen skribis: > Mark H Weaver writes: >> Anyway, I'm inclined to simply suggest using 'false-if-exception'. >> >> What do you think? > > I'm fine with this solution. My point was more about lowering the entry > barrier for beginners than performance. > If the change breaks ABI it is probably just not worth it. > > From my point of view we can close the ticket unless you want to keep it > open until the documentation for stat is fixed. Commit 63f54a7bc6adbc0f1b397872fb7eb96e84967ff1 updates the manual to document the optional parameter of =E2=80=98stat=E2=80=99. I think we can close the bug now. :-) Thanks, Ludo=E2=80=99. ------------=_1561924502-18399-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 14 Mar 2019 19:55:55 +0000 Received: from localhost ([127.0.0.1]:44081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h4WSJ-0008Ni-DE for submit@debbugs.gnu.org; Thu, 14 Mar 2019 15:55:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h4WSI-0008NV-1B for submit@debbugs.gnu.org; Thu, 14 Mar 2019 15:55:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:48286) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h4WS3-0004gM-G8 for submit@debbugs.gnu.org; Thu, 14 Mar 2019 15:55:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4WS2-00019S-ND for bug-guile@gnu.org; Thu, 14 Mar 2019 15:55:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h4WNq-0002Ib-4K for bug-guile@gnu.org; Thu, 14 Mar 2019 15:51:20 -0400 Received: from sonic308-18.consmr.mail.ir2.yahoo.com ([77.238.178.146]:40407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4WNn-0002FQ-W6 for bug-guile@gnu.org; Thu, 14 Mar 2019 15:51:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1552593067; bh=Cr/w4FNsiHhQDXL7hhcC57d+/EDbNxQm58gsN/S2cfk=; h=From:To:Subject:Date:From:Subject; b=KZpUyoNlmYyQXFjLfoG0tFMRvLO6utcoSywoZQhigi08dMjBNkdqExTkBD75HA5sWyGV4Ly/JCC+9pFI428Kl125yxKDSBhAIbplhmrzSAgPGX0TcEnBIMvsK5AfcmObPAkSBhcVmNNBUxFNp3XfYjZzl04GOBbGBS5UIfm2PG5SreLeXzIVsrLD+QvtysnQuUdTSXwo+Kr5b4QLbwkjlvKe7BZccC0MXDjDLDANS+LcodS+INO4RTio4Qo8LAygkrvvR5hos1GfNHd9B9104g4cTNTsbYGF2xJ2hX+miclkzp+bvbqlF27anJK0ChZBoTie4b4BSmReMx5KKi8E6w== X-YMail-OSG: O5IQ5AAVM1mwzGANGLq7ULBlhnMupoVSQTpRpdEIPwINMMBsRsZiCjil51fiTHO EdHgOOm3Wb1G02QxAQ2DWMrwkoT1u6TmUFz2wT3BFhhsn92OHQsKmEZqo_kC_T88Q3rmgbc.nKPs 0pLmE9hJZcPAtbSp8d4qbb1wuwwSoCuZDss1w6LvRJADTytL4foNVo_EhGnfn04HdVCHxDvVtbH_ JzJBiZ2talH02HCO2b62cTowBwxUipJ3NUO_9u6I0KU8ErGw3SgkGeQqng.V4tnV6OkN9qCuywff x1fHIOYCHtwbqos0r5oaDua0l7pUQgoHRc0ZcnhQmYJiQi_bxeUQ0jw8FmOO06siWJuP3re1lSNj rW7wgVSPDR6kAwJ7n3_Gfzj1MFqolpU3mDWB.F5ZQPC5crbmq6dHu4prOjOW9I4ZWIuDQ8blc3Xr pvSBacc6Vzcp1BBf5dSjH9UBh7QgSbG_zAfxl0LiDIk89N4mKTUl6kpuQGd3vACBADPGC8wykh.i sfhkOCalvLPtyTu2ON60r7f4ooDglWf8y5Cfq5UVhpGrDqxgZap2CxbNZeFlO6RkyOuy9BmjaCpH cTjm5Guz5roS6w7jROwlxOE6iCJStjCJl38HJRRDIvU2NJAVttyxJZ5.PurwIBx2aT1rFcsRdrAS 4cAHsmGhv0v0B0l1_AO1dLUS_9xUtj8Avj20fWg7tG_._3KxyGRULTUFzR8zERpVKjVSfue9BgwT N4puiRxHDTUB_R6cChFxiHimP0B7kiliVKXU3gOFrm5uGkhe6WHzh5vewg_2vk1KQCbmf1iRUYPz N6QKbSVfZvXiJI9HSgYCoFFeGsnlw2nE_NXX0lWZvUVdsSUwuT5Li03X5An9BwsxiPvzLb_wPmF0 sPTK8mfk.vgXtsIcSJxTIkpUWjzVs942O2v3GRvGhD3ORhpCb6EcJcfbr_1SL4HjbgAwGMB4iaEn _P9QiRYpHQZW5kTwFlG5N2sQJ_0bOfj__zhAnba.Y30qq34XHwR7i8WcvAEs_mWDQMfoU6RsxZqI RZ9fe_awYqhdQ9ttQBDx2CvvP5cY- Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ir2.yahoo.com with HTTP; Thu, 14 Mar 2019 19:51:07 +0000 Received: from ip5f5acae0.dynamic.kabel-deutschland.de (EHLO finkpad) ([95.90.202.224]) by smtp430.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 149d7faaea3c273f9517f8a742722a13 for ; Thu, 14 Mar 2019 19:51:05 +0000 (UTC) User-agent: mu4e 1.0; emacs 26.1 From: Tim Gesthuizen To: bug-guile@gnu.org Subject: Probing broken symlinks always involves errors Date: Thu, 14 Mar 2019 20:50:57 +0100 Message-ID: <87ef79z13y.fsf@yahoo.de> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 77.238.178.146 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Hi, I wrote a little application that tries to probe whether a symlink exists. The `stat` function has an undocumented optional parameter that lets stat return #f when the file does not exist. With this argument one can probe for any files excluding broken symlinks. lstat does not offer this argument. Therefore I needed to use guard-expressions around lstat to probe for broken symlinks. So probing broken symlinks relies on errors in the control flow and is not straight forward. Maybe we should add the optional argument that `stat` has and document the arguments for both commands. I am using guile 2.2.4. Tim. ------------=_1561924502-18399-1--