From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STzcy-0005uB-Vc for qemu-devel@nongnu.org; Mon, 14 May 2012 14:04:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STzcs-00011J-R8 for qemu-devel@nongnu.org; Mon, 14 May 2012 14:04:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STzcs-000116-IG for qemu-devel@nongnu.org; Mon, 14 May 2012 14:04:06 -0400 Date: Mon, 14 May 2012 15:03:58 -0300 From: Luiz Capitulino Message-ID: <20120514150358.6471534d@doriath.home> In-Reply-To: <20120514150117.1cc082a5@doriath.home> References: <20120514144058.2ffac223@doriath.home> <4FB14611.7090808@redhat.com> <20120514150117.1cc082a5@doriath.home> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] qemu-ga: guest-shutdown: use only async-signal-safe functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: Eric Blake , qemu-devel , mdroth@linux.vnet.ibm.com On Mon, 14 May 2012 15:01:17 -0300 Luiz Capitulino wrote: > > > + > > > + ret =3D execle("/sbin/shutdown", "shutdown", shutdown_flag, = "+0", > > > + "hypervisor initiated shutdown", (char*)NULL, en= viron); > >=20 > > Where was 'environ' declared? POSIX says that environ must exist, but > > that it is the one variable where you must declare it yourself rather > > than getting it from a public header. (For convenience, glibc declares > > environ in when using _GNU_SOURCE, but when you are asking > > for strict standards namespace compliance, it disappears.) >=20 > I'll declare it then. -Wredundant-decls doesn't like it: /home/lcapitulino/work/src/qmp-unstable/qga/commands-posix.c:38:15: warning= : redundant redeclaration of =E2=80=98environ=E2=80=99 [-Wredundant-decls] /usr/include/unistd.h:546:15: note: previous declaration of =E2=80=98enviro= n=E2=80=99 was here LINK qemu-ga