Re: [libvirt] [PATCH 1/2] build: avoid close, system

2011-01-28 Thread Matthias Bolte
2011/1/29 Eric Blake : > On 01/28/2011 03:39 PM, Matthias Bolte wrote: >>> +    if (!editor) >>> +        editor = "vi"; /* could be cruel & default to ed(1) here */ >> >> When VISUAL and EDITOR isn't set we fallback to vi here, but ... >> >>> +        cmd = virCommandNewArgList("sh", "-c", NULL);

Re: [libvirt] [PATCH 1/2] build: avoid close, system

2011-01-28 Thread Eric Blake
On 01/28/2011 03:39 PM, Matthias Bolte wrote: >> +if (!editor) >> +editor = "vi"; /* could be cruel & default to ed(1) here */ > > When VISUAL and EDITOR isn't set we fallback to vi here, but ... > >> +cmd = virCommandNewArgList("sh", "-c", NULL); >> +virCommandAddArgF

Re: [libvirt] [PATCH 1/2] build: avoid close, system

2011-01-28 Thread Matthias Bolte
2011/1/28 Eric Blake : > * src/fdstream.c (virFDStreamOpenFile, virFDStreamCreateFile): > Use VIR_FORCE_CLOSE instead of close. > * tests/commandtest.c (mymain): Likewise. > * tools/virsh.c (editFile): Use virCommand instead of system. > --- >  src/fdstream.c      |    6 ++-- >  tests/commandtest.c

[libvirt] [PATCH 1/2] build: avoid close, system

2011-01-28 Thread Eric Blake
* src/fdstream.c (virFDStreamOpenFile, virFDStreamCreateFile): Use VIR_FORCE_CLOSE instead of close. * tests/commandtest.c (mymain): Likewise. * tools/virsh.c (editFile): Use virCommand instead of system. --- src/fdstream.c |6 ++-- tests/commandtest.c | 12 +++--- tools/virsh.c