Date: Mon, 2 Oct 2017 09:10:01 +0200 From: Matthias Apitz <guru@unixarea.de> To: freebsd-questions@freebsd.org Subject: Re: no dead-lock when signal handler calls localtime_r() on FreeBSD, but on Linux Message-ID: <20171002071000.GA1373@sh4-5.1blu.de> In-Reply-To: <102e950a-f3f2-bff1-1025-d5e757ee793b@gmx.com> References: <20171002063425.GA21552@sh4-5.1blu.de> <102e950a-f3f2-bff1-1025-d5e757ee793b@gmx.com>
next in thread | previous in thread | raw e-mail | index | archive | help
El día Monday, October 02, 2017 a las 09:57:51AM +0300, Yuri Pankov escribió:
> On Mon, 2 Oct 2017 08:34:26 +0200, Matthias Apitz wrote:
> >
> >
> >Hello,
> >
> >I'm on the way clarifying a deadlock-issue we face on Linux when localtime_r()
> >is called in a signal-handler funtion. If you compile the code attached
> >below with gcc on Linux, the code gives what one deserves: a dead-lock
> >when Ctrl-C is pressed.
>
> Why? I don't see anything explicitly stating that localtime_r() is
> async-signal-UNsafe.
Because, as I said, it is not in the list of
The following functions are either reentrant or not interruptible by
signals and are async-signal safe. Therefore applications may invoke
them, without restriction, from signal-catching functions or from a child
process after calling fork(2) in a multi-threaded process:
in the man page sigactio(2).
matthias
--
Matthias Apitz | /"\ ASCII Ribbon Campaign:
E-mail: guru@unixarea.de | \ / - No HTML/RTF in E-mail
WWW: http://www.unixarea.de/ | X - No proprietary attachments
phone: +49-176-38902045 | / \ - Respect for open standards
| en.wikipedia.org/wiki/ASCII_Ribbon_Campaign
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171002071000.GA1373>
