all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Robert Pluim <rpluim@gmail.com>
Cc: 65919@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: bug#65919: master 160b4c295d8: ; * src/process.c (child_signal_notify): Avoid compiler warning (bug#65919).
Date: Mon, 18 Sep 2023 12:35:26 -0700	[thread overview]
Message-ID: <98c0d621-c9f7-1bc5-ed89-5d914a5dfdfd@cs.ucla.edu> (raw)
In-Reply-To: <875y47k2sn.fsf@gmail.com>

On 2023-09-18 06:51, Robert Pluim wrote:
> Is it worth the effort to use strerror_r-posix here from Gnulib?

I don't think that'd suffice, since POSIX does not require strerror_r to 
be async-signal-safe 
<https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/functions/V2_chap02.html#tag_15_04_03_03>.

Emacs could instead convert the error number to the textual 
representation of a decimal number and write that text to stderr; that 
would be async-signal-safe if done without using sprintf etc. The error 
number wouldn't be as nice as a strerror string but it would be better 
than nothing.

If you want to be fancier, whenever Emacs calls setlocale it could cache 
all the possible strerror strings into storage that safe to be used in a 
signal handler, and use one of those strings if available, outputting a 
decimal number otherwise.





      reply	other threads:[~2023-09-18 19:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <169475794317.12794.4825888702595787215@vcs2.savannah.gnu.org>
     [not found] ` <20230915060543.76EF0C051F1@vcs2.savannah.gnu.org>
2023-09-18 13:51   ` master 160b4c295d8: ; * src/process.c (child_signal_notify): Avoid compiler warning (bug#65919) Robert Pluim
2023-09-18 19:35     ` Paul Eggert [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98c0d621-c9f7-1bc5-ed89-5d914a5dfdfd@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=65919@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rpluim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.