fix lxc-info printing duplicate lines
fix lxc-info printing duplicate lines

When lxc-info's stdout is not line buffered (ie. "lxc-info -n foo |more")
the first three lines will be duplicated. This is because c->get_ips()
comes next and it forks and the child will exit() causing its fds to be
closed which flushes out its (fork duplicated) stdio buffers. The lines are
then duplicated when the parent actually gets around to flushing out its
stdio. This causes problems for programs (such as the lxc-webpanel) which
are popen()ing lxc-info.

The fix here isn't necessarily the right one, but does show what the
problem is. Seems like maybe we should fix this inside of get_ips(), for
other API callers as well.

Signed-off-by: Dwight Engen <1793d65cf7b9eefb2bb8f5bee9a4b8ba782c26da@oracle.com>
Signed-off-by: Serge Hallyn <3df611b026e4639bee8aef7a4beb2e39fcebb313@ubuntu.com>

thmo/lxc,regit/lxc,DarknessBeforeDawn/lxc,rowhit/lxc,hallyn/lxc,bostjan/lxc,yubo/lxc,codebauss/lxc,regit/lxc,terceiro/lxc,bmoar/lxc,christiaan/lxc,ecarrara/lxc,caglar10ur/lxc,sapun/lxc,JohnPeacockMessageSystems/lxc,armcc/lxc,Pelagicore/lxc,aeris/lxc,bmoar/lxc,raspberrypython/lxc,caglar10ur/lxc,lazy404/lxc,szaszg/lxc,tych0/lxc,cjwatson/lxc,JohnPeacockMessageSystems/lxc,LynxChaus/lxc,efiop/lxc,akshaykarle/lxc,caglar10ur/lxc,efiop/lxc,federicobriata/lxc,Pelagicore/lxc,sapun/lxc,QingweiPeterLan/cs188-lxc,lisongmin/lxc,weizhenwei/lxc,ecarrara/lxc,hallyn/lxc,virajs/lxc,cjwatson/lxc,GreatFruitOmsk/lxc,armcc/lxc,christiaan/lxc,Pelagicore/lxc,christiaan/lxc,ss1h2a3tw/lxc,major/lxc,rldleblanc/lxc,hfuCN/lxc,LynxChaus/lxc,rldleblanc/lxc,cjwatson/lxc,ysbnim/lxc,JohnPeacockMessageSystems/lxc,DarknessBeforeDawn/lxc,hfuCN/lxc,regit/lxc,bostjan/lxc,raspberrypython/lxc,szaszg/lxc,codebauss/lxc,hfuCN/lxc,ioops/lxc,tych0/lxc,ecarrara/lxc,fwilson42/lxc,bmoar/lxc,hkjolhede/lxc,Ponce/lxc,fwilson42/lxc,yubo/lxc,codebauss/lxc,DarknessBeforeDawn/lxc,ksperis/lxc,thmo/lxc,akshaykarle/lxc,ss1h2a3tw/lxc,lisongmin/lxc,ss1h2a3tw/lxc,akshaykarle/lxc,jirislaby/lxc,Distrotech/lxc,Distrotech/lxc,jirislaby/lxc,major/lxc,hkjolhede/lxc,szaszg/lxc,major/lxc,QingweiPeterLan/cs188-lxc,sapun/lxc,weizhenwei/lxc,lisongmin/lxc,terceiro/lxc,jirislaby/lxc,lazy404/lxc,fwilson42/lxc,QingweiPeterLan/cs188-lxc,LynxChaus/lxc,tych0/lxc,aeris/lxc,thmo/lxc,hallyn/lxc,raspberrypython/lxc,hkjolhede/lxc,ysbnim/lxc,federicobriata/lxc,Ponce/lxc,virajs/lxc,rldleblanc/lxc,ksperis/lxc,rowhit/lxc,yubo/lxc,federicobriata/lxc,armcc/lxc,aeris/lxc,rowhit/lxc,terceiro/lxc,virajs/lxc,bostjan/lxc,lazy404/lxc,weizhenwei/lxc,GreatFruitOmsk/lxc,Ponce/lxc,ksperis/lxc,Distrotech/lxc,GreatFruitOmsk/lxc,ioops/lxc,ioops/lxc,efiop/lxc,ysbnim/lxc