Re: signal handling issues

Liste des GroupesRevenir à cu programmer 
Sujet : Re: signal handling issues
De : Muttley (at) *nospam* DastardlyHQ.org
Groupes : comp.unix.programmer
Date : 31. Jan 2025, 10:15:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vni4br$3ehhv$1@dont-email.me>
References : 1 2 3
On Thu, 30 Jan 2025 19:49:58 -0000 (UTC)
Kaz Kylheku <643-408-1753@kylheku.com> wibbled:
On 2025-01-30, Scott Lurndal <scott@slp53.sl.home> wrote:
Rainer Weikusat <rweikusat@talktalk.net> writes:
If the process is multi-threaded, or if the process is
single-threaded and a signal handler is executed other than as
the result of:
>
While Geoff may chime in with the definitive answer, once
multithreading was introduced, the stdio library functions
were required to synchronize access to the underlying
FILE buffers between threads.
>
But the requirement applies to a single-threaded program in
which an asynchronous signal occurs.
>
The multi-threaded case seems to say that if the program is MT,
then if a signal occurs even as a result of the program
calling raise, etc, it is effectivecly an async signal
(since it happens as the result of a thread executing
asynchronously with regard to whatever thread catches the signal
via a handler.)

All this confusion and complexity is why I always recommend that in a
multithreaded program if you must use signals then all signals should be
blocked with a single thread dedicated to sitting in sigwait() and handling
whatever comes along.



Date Sujet#  Auteur
30 Jan 25 * signal handling issues14Rainer Weikusat
30 Jan 25 +- Re: signal handling issues1Rainer Weikusat
30 Jan 25 +* Re: signal handling issues4Kaz Kylheku
30 Jan 25 i`* Re: signal handling issues3Dan Cross
31 Jan 25 i `* Re: signal handling issues2Rainer Weikusat
31 Jan 25 i  `- Re: signal handling issues1Dan Cross
30 Jan 25 +* Re: signal handling issues5Kaz Kylheku
31 Jan 25 i`* Re: signal handling issues4Muttley
1 Feb 25 i `* Re: signal handling issues3Lawrence D'Oliveiro
2 Feb 25 i  `* Re: signal handling issues2Muttley
4 Feb 25 i   `- Re: signal handling issues1Rainer Weikusat
3 Feb 25 `* Re: signal handling issues3Geoff Clare
6 Feb 25  `* Re: signal handling issues2Geoff Clare
6 Feb 25   `- Re: signal handling issues1Rainer Weikusat

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal