On 04/13/2016 03:53 PM, Eric Blake wrote:
>> + mask = umask (0);
>> + if (mask == -1) {
>> + perror ("umask");
>
> perror() is NOT async-safe (it manipulates stdio, and could permanently
> wedgelock the child if you happened to fork() while some other thread
> was also using stdio). Safe error reporting in a fork()d child is
> basically impossible; the best you can do is write() something back to
> the parent and let the parent do the error reporting. :(The official list is at: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04 at the end of subheading 2.4.3 although you'll want to also consult http://austingroupbugs.net/view.php?id=692 for several functions (like strlen()) that were accidentally omitted from the list and will appear when POSIX 2008 TC 2 comes out later this year. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
