Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

DCE, POSIX, UI) When should I use thread-safe “_r” library calls?

DCE library POSIX thread-safe UI
0
Posted

DCE, POSIX, UI) When should I use thread-safe “_r” library calls?

0

If your system provides threads, it will probably provide a set of thread-safe variants of standard C library routines. A small number of these are mandated by the POSIX standard, and many Unix vendors provide their own useful supersets, including functions such as gethostbyname_r(). Unfortunately, the supersets that different vendors support do not necessarily overlap, so you can only safely use the standard POSIX-mandated functions. The thread-safe routines are conceptually “cleaner” than their stateful counterparts, though, so it is good practice to use them wherever and whenever you can.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123