From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.devel Subject: Re: Improve reporting of I/O, access errors for Emacs Date: Mon, 16 Sep 2019 12:07:09 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000078cd750592a99c17" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="241516"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Emacs Development To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 16 13:08:33 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i9orw-0010ck-9p for ged-emacs-devel@m.gmane.org; Mon, 16 Sep 2019 13:08:32 +0200 Original-Received: from localhost ([::1]:32892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9oru-0007jX-Ry for ged-emacs-devel@m.gmane.org; Mon, 16 Sep 2019 07:08:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51968) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9or4-0007jM-8x for Emacs-devel@gnu.org; Mon, 16 Sep 2019 07:07:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9or3-0007ST-3c for Emacs-devel@gnu.org; Mon, 16 Sep 2019 07:07:38 -0400 Original-Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]:45506) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i9or2-0007S5-Uv for Emacs-devel@gnu.org; Mon, 16 Sep 2019 07:07:37 -0400 Original-Received: by mail-oi1-x236.google.com with SMTP id o205so7877959oib.12 for ; Mon, 16 Sep 2019 04:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w3n+Z2hd1BGZccSlTb6cTPkKD3qCsH/0WfAcYFBj/kQ=; b=SfjseE74ag01+E2bE2e7zv198Me7r6eOn0P4zt4lm2fW7uuU6VfhzP2WH5WMkB6JKN yYq2VL9sA2ELtjVYQbk+ey8IuKOOqg+jIyxQol9CT2BbiI5jB6KfQPHcqTD8+FDJvKp4 IGNfQ95gWhP89/CqEO2EYoRPDLSmyGpf3nVq0RYTxWCLd45S4czPTEnCdCYsMrEEe3vJ vG/GWMUw3FShQJhSOCusLET3v0EvR5dsMsFqMuMhmQS2C9NB6GPr4grmdCXAqcwo6UO6 tHKlBYb0wu5BoS6ur9dEY6/ra4Oo8nK8nIBswEIrgX9ICJn9kW8l28B2+ya5uCTRSNpT z4ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w3n+Z2hd1BGZccSlTb6cTPkKD3qCsH/0WfAcYFBj/kQ=; b=k7FJAGwnodsrC140lYhD855YFrDHxCePA8yy9YWbYAqq+B97uhz0d09+tLJs162bup CQqo4L8ULmIj9uUTlSFirbmTvfFck9omqQlF/wRVUDbLR7CErtYdb9llsQwRzBUoxkq3 U2g8KUW68Pz91QQeUVk6L9keBpPFEWnthqqSpFf9YCCdype9yNFzNmCOJAqwCKY9vRo1 8eKDs2XjvkmSqE5o8/Sniod6sheP3h4FBT6tKvSUtGKJt7F2qGtSsZDClNx1wjdYCwGl hMWFk/AAIRnClSVktVfHx4N7JJHEhxa8ztJIWOHjFZ6sWYfMUX4GBRC9xAJXBsaspWgt NlUQ== X-Gm-Message-State: APjAAAXJe5Pc4uY5tKaD5YI49UJKqE/QKwV37v7IPDhrCiDXOGMnw+Eo 6ZCTli0APMQmlnBZvEYZ9q5uiTB5ofrWjilMAt0= X-Google-Smtp-Source: APXvYqyO0LLiFhjnIsWwWHTau4V3K85sSr/QtRBqhQeJeO2w/TA5IQ2WzAAfKTy/3Oo/R2tPZP4MDXBn6qB/Kq8oamA= X-Received: by 2002:aca:5bd4:: with SMTP id p203mr12609548oib.153.1568632055842; Mon, 16 Sep 2019 04:07:35 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240071 Archived-At: --00000000000078cd750592a99c17 Content-Type: text/plain; charset="UTF-8" On Thu, 12 Sep 2019 at 09:23, Paul Eggert wrote: > > A half-dozen or so of the issues I found had simpler fixes, which I've > already > installed into master. > Hi Paul, At the end of init_callproc in callproc.c, we check that PATH_GAME is file_accessible_directory_p. On Windows, PATH_GAME begins with a literal '%emacs_dir%', so this never works, but sets errno to ERROR_ACCESS_DENIED. Therefore, on every invocation of Emacs, I get this warning: Warning: game dir '%emacs_dir%/var/games/emacs': Permission denied Passing PATH_GAME through w32_relocate first makes it try the correct filename (in my environment that's "c:\projects\emacs/var/games/emacs" uninstalled or "c:\msys64\mingw64/var/games/emacs" installed). Those directories don't exist and this still sets errno to ERROR_ACCESS_DENIED on Windows. Whether or not the relocation bug gets fixed, you should probably silently ignore ERROR_ACCESS_DENIED (treat it as ENOENT) there, on Windows. (In my local copy of the repo, I've just replaced that whole block with "Vshared_game_score_directory = Qnil", since that's what I'll end up with, whatever happens.) --00000000000078cd750592a99c17 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, 12 Sep 2019 at 09:23, Paul Eggert <eggert@cs.ucla.edu> wrote:

A half-dozen or so of the issues I found had simpler fixes, which I've = already
installed into master.

Hi Paul,

At the end of init_callproc in callproc.c, we check that = PATH_GAME is file_accessible_directory_p. On Windows, PATH_GAME begins with= a literal '%emacs_dir%', so this never works, but sets errno to ER= ROR_ACCESS_DENIED. Therefore, on every invocation of Emacs, I get this warn= ing:

=C2=A0 Warning: game dir '%emacs_dir%/var= /games/emacs': Permission denied

Passing PATH= _GAME through w32_relocate first makes it try the correct filename (in my e= nvironment that's "c:\projects\emacs/var/games/emacs" uninsta= lled or "c:\msys64\mingw64/var/games/emacs" installed). Those dir= ectories don't exist and this still sets errno to ERROR_ACCESS_DENIED o= n Windows. Whether or not the relocation bug gets fixed, you should probabl= y silently ignore ERROR_ACCESS_DENIED (treat it as ENOENT) there, on Window= s. (In my local copy of the repo, I've just replaced that whole block w= ith "Vshared_game_score_directory =3D Qnil", since that's wha= t I'll end up with, whatever happens.)

--00000000000078cd750592a99c17--