All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: ell@lists.01.org
Subject: Re: [PATCH 7/7] examples: add acd client implementation [async safety in example signal handler?]
Date: Tue, 08 Dec 2020 09:16:31 -0800	[thread overview]
Message-ID: <b6fdd57c205e529686f5587c3704258191effc72.camel@gmail.com> (raw)
In-Reply-To: <A317175E-272D-4E27-A2D8-19847ED89805@bluewin.ch>

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

Hi Phil,

On Sun, 2020-12-06 at 23:06 +0100, Phil wrote:
> Hope you are not calling any functions that are not "async-safe" in
> that signal handler.
> 
> Looks like l_main_quit just sets a flag so is probably ok, but what
> is to stop l_info interrupting another log call?

I went ahead and CC'd the list so everyone can see it.

Thats a good point. What is unclear to me is if the actual signal
handler call is from an interrupt or not. Looks like the l_signal APIs
use an IO read handler and are a bit more complex than e.g. calling the
POSIX signal().

Not that it makes it 'ok' but every single example/tool, even IWD,
prints from the signal handler. If this is an issue we certainly would
want to remove those prints.

Does anyone else know the details of this? Are signal handlers
registered from l_main_run_with_signal printf safe?

Thanks,
James



       reply	other threads:[~2020-12-08 17:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <A317175E-272D-4E27-A2D8-19847ED89805@bluewin.ch>
2020-12-08 17:16 ` James Prestwood [this message]
2020-12-08 18:43   ` [PATCH 7/7] examples: add acd client implementation [async safety in example signal handler?] Denis Kenzior
2020-12-08 19:22   ` Phil

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=b6fdd57c205e529686f5587c3704258191effc72.camel@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=ell@lists.01.org \
    /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.
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.