- 25 2月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
When executed from cron, commandtest would fail to correctly identify daemon processes. Set session ID and process group IDs at startup to ensure we have a consistent environment to run in. * tests/commandtest.c: Call setsid() and setpgid()
-
- 30 1月, 2011 1 次提交
-
-
由 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/util/util.c (__virExec): Special case preservation of std file descriptors to child.
-
- 22 12月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* src/util/command.c (virCommandRun): Don't capture output on daemons. * tests/commandtest.c (test18): Expose the bug. Reported by Laine Stump.
-
- 14 12月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* tests/commandtest.c (mymain): Kill off any leaked-in fds. * autobuild.sh: Don't leak fds. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 10 12月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* tests/Makefile.am (SUBDIRS): Add commanddata. * tests/commandtest.c (checkoutput): Delete correct file. (test4): Delete pid file. (mymain): Delete unused variable. * tests/commanddata/Makefile.am: New file. * configure.ac (AC_OUTPUT): Build new makefile. Reported by Dominik Klein.
-
- 08 12月, 2010 5 次提交
-
-
由 Eric Blake 提交于
Guarantee that outbuf/errbuf are allocated on success, even if to the empty string. Caller always has to free the result, and empty output check requires checking if *outbuf=='\0'. Makes the API easier to use safely. Failure is best effort allocation (some paths, like out-of-memory, cannot allocate a buffer, but most do), so caller must free buffer on failure. * docs/internals/command.html.in: Update documentation. * src/util/command.c (virCommandSetOutputBuffer) (virCommandSetErrorBuffer, virCommandProcessIO) Guarantee empty string on no output. * tests/commandtest.c (test17): New test.
-
由 Jiri Denemark 提交于
-
由 Eric Blake 提交于
Most leaks could only occur on error cleanup paths.
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
- 03 12月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
This introduces a new set of APIs in src/util/command.h to use for invoking commands. This is intended to replace all current usage of virRun and virExec variants, with a more flexible and less error prone API. * src/util/command.c: New file. * src/util/command.h: New header. * src/Makefile.am (UTIL_SOURCES): Build it. * src/libvirt_private.syms: Export symbols internally. * tests/commandtest.c: New test. * tests/Makefile.am (check_PROGRAMS): Run it. * tests/commandhelper.c: Auxiliary program. * tests/commanddata/test2.log - test15.log: New expected outputs. * cfg.mk (useless_free_options): Add virCommandFree. (msg_gen_function): Add virCommandError. * po/POTFILES.in: New translation. * .x-sc_avoid_write: Add exemption. * tests/.gitignore: Ignore new built file.
-