Displaying 20 results from an estimated 334 matches for "run_commands".
Did you mean:
run_command
2017 Jun 20
2
[PATCH v2 1/2] mllib: add new Common_utils.run_commands
...ib, it is an helper
function to run multiple commands in parallel, waiting for all of them
at once, and returning all their exit codes. It is possible to pass
custom descriptors for collecting stdout and stderr of each command.
Common_utils.run_command is adapted to use few helper methods used by
run_commands, so all the existing code using it keeps working; in
addition, it gets labelled parameters for stdout and stderr FDs.
Add a simple unit tests for them.
---
mllib/common_utils.ml | 87 ++++++++++++++++++++++++++++++++++++---------
mllib/common_utils.mli | 21 ++++++++++-
mllib/common_ut...
2016 May 23
0
[PATCH 5/5] mllib: add a new run_command helper
Add a simple helper to run a command from a sequence of arguments,
without using a shell: this should help reducing the amount of quoting
ineeded, since arguments are passed straight as such.
Make use of it in the places currently using shell_command, and which
don't assume they can run anything (so no shell redirections, `env`,
etc).
---
builder/builder.ml | 62
2017 Apr 07
1
[PATCH 1/2] mllib: add new Common_utils.run_commands
...++++++++++
3 files changed, 132 insertions(+), 22 deletions(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 73546d7..0008d3a 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -825,29 +825,70 @@ let external_command ?(echo_cmd = true) cmd =
);
lines
+let run_commands ?(echo_cmd = true) cmds =
+ let res = Array.make (List.length cmds) 0 in
+ let get_fd default = function
+ | None ->
+ default
+ | Some fd ->
+ Unix.set_close_on_exec fd;
+ fd
+ in
+ let pids =
+ mapi (
+ fun i (args, out, err) ->
+ let app = List.hd...
2016 Aug 02
1
Re: [PATCH] mllib: check for executable existance in run_command (RHBZ#1362357)
On Tue, Aug 02, 2016 at 07:14:09PM +0200, Pino Toscano wrote:
> run_command uses Unix.create_process which forks a child process, and
> executes execve: the latter fails when the executable does not exist,
> triggering the exit which, in older OCaml versions [1], also runs the
> at_exit handlers.
>
> Since there is not much that can be done to avoid this on the OCaml
> side,
2010 May 13
2
Compiling R with --enable-R-shlib for rpy2 error
Hi,
I am trying to compile R with the command below in order to install rpy2.
./configure --prefix=/usr/local/R/R-2.9.2 --with-gnu-ld --with-cairo
--with-x --enable-R-shlib
However, error the I have gotten was:
/usr/bin/ld: CConverters.o: relocation R_X86_64_32S against `R_FunTab' can
not be used when making a shared object; recompile with -fPIC
CConverters.o: could not read symbols: Bad
2016 Aug 02
0
[PATCH] mllib: check for executable existance in run_command (RHBZ#1362357)
run_command uses Unix.create_process which forks a child process, and
executes execve: the latter fails when the executable does not exist,
triggering the exit which, in older OCaml versions [1], also runs the
at_exit handlers.
Since there is not much that can be done to avoid this on the OCaml
side, to keep run_command working also in older OCaml version then
manually search for the existance of
2019 Jan 08
1
[PATCH] v2v: -o openstack: Don't echo full commands (RHBZ#1664310).
They can contain passwords or tokens if for example the
‘-oo os-password’ option is used.
Thanks: Tomáš Golembiovský, Brett Thurber.
---
v2v/output_openstack.ml | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/v2v/output_openstack.ml b/v2v/output_openstack.ml
index 95c42cbed..3ff1e1269 100644
--- a/v2v/output_openstack.ml
+++ b/v2v/output_openstack.ml
@@ -177,8
2016 Dec 24
1
lua.c32 : run_command() does not work if ALLOWOPTIONS from menu is set to 0
Good day,
If I set allowoptions to 0 to hide editing menu entries and then select to
run lua.c32 from menu , run_command() from inside the script it seems to
invoke kernel/com32 modules without any parameter. For example pxechn.c32
will never be happy no matter what the command line is. But if you set
allowoptions to 1 everything starts to work as expected, except the menu
itself.
2006 Mar 08
3
Run command via SSH session displaying results via AJAX
I am trying to create a web app that allows me to invoke a command on
another server via an SSH session. I am currently doing this as
follows:
1) User is presented with a form to enter server, command, username and
password.
2) User clicks "Run" and form is submitted to the "run_command" action.
3) The "run_command" action initiates an SSH session using net-ssh
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:
2016 May 23
7
[PATCH 1/5] mllib: make external_command echo the command executed
Add an optional parameter to disable this behaviour, so the Curl module
in v2v won't print user-sensible data (like passwords).
---
builder/checksums.ml | 1 -
builder/downloader.ml | 1 -
builder/sigchecker.ml | 1 -
mllib/common_utils.ml | 4 +++-
mllib/common_utils.mli | 7 +++++--
v2v/curl.ml | 2 +-
6 files changed, 9 insertions(+), 7 deletions(-)
diff --git
2017 Jun 20
0
[PATCH v2 2/2] dib: use Common_utils.run_commands
...- let matching_pair = List.hd matching_pair in
- let _, csum_tool, outfd = matching_pair in
- Unix.close outfd;
- pids := new_pids;
- match stat with
- | Unix.WEXITED 0 -> ()
- | Unix.WEXITED i ->
+ let res = run_commands cmds in
+ iteri (
+ fun i code ->
+ if code <> 0 then (
+ let args, _, _ = List.nth cmds i in
error (f_"external command ‘%s’ exited with error %d")
- csum_tool i
- | Unix.WSIGNALED i ->
-...
2018 Aug 17
8
[PATCH v3 4/4] v2v: Add --print-estimate option to print copy size
I rethought this again, as I think that it's a dangerous assumption to
bake qemu-img measure output into our API.
This patch series runs qemu-img measure behind the scenes, but then
parses the output and sums it to a single number which we print.
Doing that required a bit of reworking, moving the Jansson [JSON
parser] bindings from virt-builder into the common directory and
a couple of other
2016 Sep 13
1
[PATCH] v2v: -o glance: set all properties during creation (RHBZ#1374405)
The glance client v1.0.0 defaults to the Image v2 API: this means that
an image can be referenced only by its UUID, and not anymore by the name
as well (which does not need to be unique). This caused our glance
invocation to set the properties for the newly created image to fail,
since we are using the name as identifier.
Instead of first creating the image and then setting all the properties
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
2008 Dec 10
1
[PATCH 1/2] COM32: lua - add syslinux library
Hi,
the attached patch adds a new call to lua (patch is against latest lua
branch):
syslinux.run_command(...)
It's just a little glue to call syslinux_run_command() from lua. Other
syslinux
functions should be easy to add.
usage:
syslinux.run_command("memdisk initrd=/dos/BIOS/FSC-P7935-108.img raw")
Bye,
Marcel
-------------- next part --------------
A non-text attachment
2015 Jan 26
6
[PATCH 1/6] cmd: add a way to run (and wait) asynchronously commands
---
src/command.c | 64 +++++++++++++++++++++++++++++++++++++++++++-------
src/guestfs-internal.h | 3 +++
2 files changed, 58 insertions(+), 9 deletions(-)
diff --git a/src/command.c b/src/command.c
index 4bb469b..e26573d 100644
--- a/src/command.c
+++ b/src/command.c
@@ -360,7 +360,7 @@ debug_command (struct command *cmd)
}
static int
-run_command (struct command *cmd)
2016 Jul 20
1
[PATCH] v2v: make virsh command quiet if v2v is quiet (RHBZ#1358142)
Pass -q to virsh if virt-v2v was run with -q, to reduce its output in
quiet mode.
Unfortunately this does not currently work in virsh as it should, see
RHBZ#1358179, so only after that bug is fixed this change can actually
take effect.
---
v2v/output_libvirt.ml | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/v2v/output_libvirt.ml b/v2v/output_libvirt.ml
2016 Aug 02
2
[PATCH] mllib: move which and its exception from dib
Rename it from "tool" to "executable" in the process, but otherwise
it is just code motion (with minimal adjustments in dib).
---
dib/dib.ml | 2 +-
dib/utils.ml | 16 +---------------
mllib/common_utils.ml | 14 ++++++++++++++
mllib/common_utils.mli | 9 +++++++++
4 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/dib/dib.ml b/dib/dib.ml
2009 Jul 13
0
[PATCH server] remove vm forward vnc and vm host history
since the introduction of ovirt-vnc-proxy and the updating
of ovirt-viewer to user it the forward vnc functionality is
no longer necessary / and incompatable w/ the current system.
---
src/app/controllers/vm_controller.rb | 2 -
src/app/models/host.rb | 9 -
src/app/models/vm.rb | 36 ----