Re: [libvirt] [PATCH 08/10] virt-login-shell: use single instead of double fork

2014-03-05 Thread John Ferlan
Coverity has found an issue (NEGATIVE_RETURNS) The 'nfdlist' is the culprit. diff --git a/tools/virt-login-shell.c b/tools/virt-login-shell.c index 666facf..75a5223 100644 --- a/tools/virt-login-shell.c +++ b/tools/virt-login-shell.c @@ -41,24 +41,8 @@ #include vircommand.h #define

Re: [libvirt] [PATCH 08/10] virt-login-shell: use single instead of double fork

2014-03-05 Thread Eric Blake
On 03/05/2014 06:57 AM, John Ferlan wrote: Coverity has found an issue (NEGATIVE_RETURNS) The 'nfdlist' is the culprit. cleanup: +for (i = 0; i nfdlist; i++) +VIR_FORCE_CLOSE(fdlist[i]); (41) Event negative_returns: Using unsigned variable nfdlist in a loop exit

Re: [libvirt] [PATCH 08/10] virt-login-shell: use single instead of double fork

2014-03-05 Thread John Ferlan
On 03/05/2014 01:55 PM, Eric Blake wrote: On 03/05/2014 06:57 AM, John Ferlan wrote: Coverity has found an issue (NEGATIVE_RETURNS) The 'nfdlist' is the culprit. cleanup: +for (i = 0; i nfdlist; i++) +VIR_FORCE_CLOSE(fdlist[i]); (41) Event negative_returns:

[libvirt] [PATCH 08/10] virt-login-shell: use single instead of double fork

2014-02-19 Thread Eric Blake
Note that 'virsh lxc-enter-namespace' must double-fork, for two reasons: some namespaces can only be done from a single thread, while virsh is multithreaded; and because virsh can be run in batch mode where we must not corrupt the namespace of that execution upon return from the subsidiary