search for: pipecmd

Displaying 10 results from an estimated 10 matches for "pipecmd".

Did you mean: pieced
2009 Aug 19
2
[PATCH libguestfs] guestfish: detect a few more failed syscalls
...ed syscalls. --- fish/fish.c | 26 +++++++++++++++++++++----- 1 files changed, 21 insertions(+), 5 deletions(-) diff --git a/fish/fish.c b/fish/fish.c index 830617b..e6cd270 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -750,8 +750,14 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd) if (pipecmd) { int fd[2]; - fflush (stdout); - pipe (fd); + if (fflush (stdout)); { + perror ("failed to flush standard output"); + return -1; + } + if (pipe (fd)) { + perror ("pipe failed"); + return -1; + } pid = fork ();...
2012 May 02
0
[PATCH] fish: Add --pipe-error flag to allow detection of errors in pipe commands (RHBZ#803533).
...pipe-error")) { + pipe_error = 1; } else { fprintf (stderr, _("%s: unknown long option: %s (%d)\n"), program_name, long_options[option_index].name, option_index); @@ -1129,6 +1135,15 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd, perror ("failed to flush standard output"); return -1; } + if (ferror (stdout)) { + if (!pipecmd || pipe_error) { + fprintf (stderr, "%s: write error%s\n", program_name, + pipecmd ? " on pipe" : ""); + r = -1; + }...
2016 Sep 05
0
Re: guestfs_launch gets stuck
...guestfs_launch (g=0x7fe6f8e04bd0) at actions-3.c:142 #8 0x00007fe6f86e7eda in run_launch (cmd=<optimized out>, argc=<optimized out>, argv=<optimized out>) at cmds.c:13411 #9 0x00007fe6f870276c in issue_command (cmd=0x7fe6f8df5170 "run", argv=argv@entry=0x7ffe4c053f98, pipecmd=0x0, rc_exit_on_error_flag=<optimized out>) at fish.c:1181 #10 0x00007fe6f870334e in script (prompt=prompt@entry=1) at fish.c:733 #11 0x00007fe6f86c7262 in interactive () at fish.c:630 #12 main (argc=1, argv=0x7ffe4c0543f8) at fish.c:577 I tried export LIBGUESTFS_BACKEND=direct, and it is...
2016 Aug 29
2
Re: guestfs_launch gets stuck
Thanks Rich. I have used libguestfs for several month. It worked perfectly before, the issue appears recently. I am trying guestfs_set_backend (g, "direct"). Thanks, Allen 2016-08-29 23:31 GMT+08:00 Richard W.M. Jones <rjones@redhat.com>: > On Mon, Aug 29, 2016 at 11:19:04PM +0800, Baochuan Wu wrote: > > Thanks Rich for you quick reply. I enabled logs and the program
2016 Sep 08
4
[PATCH 0/3] Use gnulib's getprogname
Hi, this series update libguestfs to a recent gnulib version, so that we can use its new getprogname module, and solve altogether one of the porting issues (the need for 'program_name' by the error module of gnulib), and have a single way to get the name of the current program. A number of changes in tools mostly, although mechanical. Thanks, Pino Toscano (3): Update gnulib to latest
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...cmd, "emacs")) editor = "emacs -nw"; else { editor = getenv ("EDITOR"); diff --git a/fish/fish.c b/fish/fish.c index 3ab09b5..9a89f55 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -843,40 +843,40 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd) r = rc_remote (remote_control, cmd, argc, argv, exit_on_error); /* Otherwise execute it locally. */ - else if (strcasecmp (cmd, "help") == 0) { + else if (STRCASEEQ (cmd, "help")) { if (argc == 0) list_commands (); else display_command (argv[0...
2010 Aug 31
13
[PATCH v2] Add progress bars
This is an updated and extended version of the original patch: https://www.redhat.com/archives/libguestfs/2010-August/msg00163.html This adds OCaml and Perl bindings (both tested), support for progress bars in virt-resize, and adds progress notifications to a number of the simpler commands. Still to do is to add progress messages to more commands. There are still a few commands which would be
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but separating them is a lot of work. With *both* patches applied, all the tests and extra-tests pass. That's no guarantee however that there isn't a mistake, so I don't think this patch is a candidate for the 1.16 branch, until it's had a lot more testing in development. Rich.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...+ argv[i] = try_tilde_expansion (p); i++; p = pend; if (*p) - p += strspn (p, " \t"); + p += strspn (p, " \t"); } if (i == sizeof argv / sizeof argv[0]) { @@ -759,8 +759,8 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd) r = system (pipecmd); if (r == -1) { - perror (pipecmd); - _exit (1); + perror (pipecmd); + _exit (1); } _exit (WEXITSTATUS (r)); } @@ -787,26 +787,26 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd) r = 0; } else if (...
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.