[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-diffutils] new warnings due to use of vfork
From: |
Eric Blake |
Subject: |
Re: [bug-diffutils] new warnings due to use of vfork |
Date: |
Mon, 24 Jan 2011 08:27:20 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
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 address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature