[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qemu-ga: guest-shutdown: use only async-signal-
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [PATCH] qemu-ga: guest-shutdown: use only async-signal-safe functions |
Date: |
Mon, 14 May 2012 15:03:58 -0300 |
On Mon, 14 May 2012 15:01:17 -0300
Luiz Capitulino <address@hidden> wrote:
> > > +
> > > + ret = execle("/sbin/shutdown", "shutdown", shutdown_flag, "+0",
> > > + "hypervisor initiated shutdown", (char*)NULL,
> > > environ);
> >
> > 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 <unistd.h> when using _GNU_SOURCE, but when you are asking
> > for strict standards namespace compliance, it disappears.)
>
> 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 ‘environ’ [-Wredundant-decls]
/usr/include/unistd.h:546:15: note: previous declaration of ‘environ’ was here
LINK qemu-ga