Eric Blake wrote: > On 01/24/2011 04:29 AM, Jim Meyering wrote: >> 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.
Hi Eric, Thanks for the feedback. I've gone ahead and pushed that, leaving the simple vfork->fork transition. I confess that I don't see a lot of value in working on mingw portability for grep right now, but if you're interested, I'm sure it'd be welcomed by some.
