[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: thread safety.
- From: Asko Kauppi <askok@...>
- Date: Fri, 12 Jun 2009 07:54:07 +0300
The re-entrant gmtime_r() and localtime_r() are not ANSI C, I believe.
You can provide a patch but inclusion of non-ANSI C features has
seemed to be a 'no'. Maybe this will change, eventually.
"The asctime_r(), ctime_r(), gmtime_r(), and localtime_r() functions
are expected to conform to ISO/IEC 9945-1:1996 (``POSIX.1'')"
Can you post a case where using such functions really presents a
hazard, in a multithreaded application?
Why do you think 'system' is a problem? Maybe it's been on the
warning list because when you launch external programs, there's no
guarantee how multithread unfriendly they could be? I find no problem
with 'system()' itself.
George Neill kirjoitti 12.6.2009 kello 3:11:
Thanks for awesome Lua language, this is my first post to the
I did a quick double check for some known non-reentrant functions and
I found a handful of potential MT issues in loslib.c
os_execute calls system() not MT safe.
os_date calls either gmtime() or localtime() both are not MT safe.
... possibly others?
I'd like to fix those which can be fixed and provide a patch, would it
be preferable to enable a macro named something like