Displaying 8 results from an estimated 8 matches for "capture_errors".
2023 Jul 11
1
[libguestfs PATCH] lib: remove guestfs_int_cmd_clear_close_files()
...h
@@ -751,7 +751,6 @@ extern void guestfs_int_cmd_set_stdout_callback (struct command *, cmd_stdout_ca
extern void guestfs_int_cmd_set_stderr_to_stdout (struct command *);
extern void guestfs_int_cmd_set_child_rlimit (struct command *, int resource, long limit);
extern void guestfs_int_cmd_clear_capture_errors (struct command *);
-extern void guestfs_int_cmd_clear_close_files (struct command *);
extern void guestfs_int_cmd_set_child_callback (struct command *, cmd_child_callback child_callback, void *data);
extern int guestfs_int_cmd_run (struct command *);
extern void guestfs_int_cmd_close (struct co...
2015 Sep 29
8
[PATCH 0/7] copy-in/copy-out: Capture errors from tar subprocess (RHBZ#1267032).
Commits 3c27f3d91e1566854747bbe844186783fc84f3a8 and
1b6f0daa9ae7fcc94e389232d0c397816cda973d added an internal API for
running commands asynchronously. It is only used by the copy-in and
copy-out APIs.
Unfortunately this made the command code very complex: it was almost
impossible to redirect stderr to a file, and there were a lot of
long-range dependencies through the file. It was also buggy:
2017 Sep 11
1
[PATCH] lib: command: Print command before running it with guestfs_int_cmd_pipe_run.
...6e5..bc469de59 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -791,6 +791,9 @@ guestfs_int_cmd_pipe_run (struct command *cmd, const char *mode)
finish_command (cmd);
+ if (cmd->g->verbose)
+ debug_command (cmd);
+
/* Various options cannot be used here. */
assert (!cmd->capture_errors);
assert (!cmd->stdout_callback);
--
2.13.2
2015 Feb 02
8
[PATCH 0/7 v2] Make copy_in & copy_out APIs, and use copy_in in customize
Hi,
attached there is the second version of the patch series adding
copy_in and copy_out in the library, mostly moving them from guestfish.
It also adds the copy_in usage in virt-customize, as aid in a new image
building.
Thanks,
Pino Toscano (7):
cmd: add a way to run (and wait) asynchronously commands
cmd: add a child-setup callback
cmd: add the possibility to get a fd to the process
2012 Oct 18
10
[PATCH 0/10] Add a mini-library for running external commands.
Inspired by libvirt's virCommand* internal mini-library, this adds
some internal APIs for running commands.
The first patch contains the new APIs. The subsequent patches change
various parts of the library over to use it.
Rich.
2015 Jan 26
6
[PATCH 1/6] cmd: add a way to run (and wait) asynchronously commands
...bool get_stderr_fd)
{
struct sigaction sa;
int i, fd, max_fd, r;
@@ -368,8 +368,11 @@ run_command (struct command *cmd)
int outfd[2] = { -1, -1 };
char status_string[80];
+ get_stdout_fd = get_stdout_fd || cmd->stdout_callback != NULL;
+ get_stderr_fd = get_stderr_fd || cmd->capture_errors;
+
/* Set up a pipe to capture command output and send it to the error log. */
- if (cmd->capture_errors) {
+ if (get_stderr_fd) {
if (pipe2 (errorfd, O_CLOEXEC) == -1) {
perrorf (cmd->g, "pipe2");
goto error;
@@ -377,7 +380,7 @@ run_command (struct command *...
2015 May 26
0
[PATCH] lib: Limit space and time used by 'qemu-img info' subprocess.
...fd,
int outfd[2] = { -1, -1 };
int infd[2] = { -1, -1 };
char status_string[80];
+#ifdef HAVE_SETRLIMIT
+ struct child_rlimits *child_rlimit;
+ struct rlimit rlimit;
+#endif
get_stdout_fd = get_stdout_fd || cmd->stdout_callback != NULL;
get_stderr_fd = get_stderr_fd || cmd->capture_errors;
@@ -510,6 +546,23 @@ run_command (struct command *cmd, bool get_stdin_fd, bool get_stdout_fd,
_exit (EXIT_FAILURE);
}
+#ifdef HAVE_SETRLIMIT
+ for (child_rlimit = cmd->child_rlimits;
+ child_rlimit != NULL;
+ child_rlimit = child_rlimit->next) {
+ rlimit.rlim_cur...
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers.
These aren't valid for global names in C++.
(http://stackoverflow.com/a/228797)
These large but completely mechanical patches change the illegal
identifiers to legal ones.
Rich.