On 01/24/2011 04:29 AM, Jim Meyering wrote:
> Hi Paul,
> 
> I built diffutils today using gcc-4.6.0 on rawhide, and it failed
> when configured with --enable-gcc-warnings:
> 
> sdiff.c: In function 'main':
> sdiff.c:572:19: error: variable 'lname' might be clobbered by 'longjmp' or 
> 'vfork' [-Werror=clobbered]
> sdiff.c:572:27: error: variable 'rname' might be clobbered by 'longjmp' or 
> 'vfork' [-Werror=clobbered]
> cc1: all warnings being treated as errors
> 
> Also, considering that vfork is no longer even specified by POSIX.1-2008,
> do you know of any reason to continue using it?

I agree wholeheartedly with dropping any attempts to use vfork.  It is
so underspecified in POSIX 2001 as to be unusable in a portable context
except for the most extremely limited environments, and most programs
don't meet those conditions.  Using fork() is okay; posix_spawn() would
also be nice - that drags in more of gnulib, but makes mingw porting easier.

-- 
Eric Blake   [email protected]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to