search for: close_on_exit

Displaying 18 results from an estimated 18 matches for "close_on_exit".

2013 Dec 27
0
[PATCH] ruby: Fix .new method (RHBZ#1046509).
The .new method was unintentionally broken in commit 9466060201600db47016133d80af22eb38091a49. This fixes the .new method and allows it to be called with multiple parameters, so you can use: Guestfs::Guestfs.new Guestfs::Guestfs.new() Guestfs::Guestfs.new(:close_on_exit => false) etc. For backwards compatibility, Guestfs::create may still be used. This commit also adds regression tests: - Use .new method in regular tests. (Because this was not done before, we didn't catch the breakage.) - Test that ::create still works. - Test that args can be...
2013 Jan 24
1
[PATCH] python: Inherit from 'object' base class.
....ml +++ b/generator/python.ml @@ -662,7 +662,7 @@ import libguestfsmod class ClosedHandle(ValueError): pass -class GuestFS: +class GuestFS(object): \"\"\"Instances of this class are libguestfs API handles.\"\"\" def __init__ (self, environment=True, close_on_exit=True): -- 1.8.1
2016 May 05
1
[PATCH] python: use constants instead of raw values
...le (m); + return m; /* m might be NULL if module init failed */ } @@ -719,9 +722,9 @@ class GuestFS(object): \"\"\" flags = 0 if not environment: - flags |= 1 + flags |= libguestfsmod.GUESTFS_CREATE_NO_ENVIRONMENT if not close_on_exit: - flags |= 2 + flags |= libguestfsmod.GUESTFS_CREATE_NO_CLOSE_ON_EXIT self._o = libguestfsmod.create(flags) self._python_return_dict = python_return_dict diff --git a/python/guestfs-py-byhand.c b/python/guestfs-py-byhand.c index cf8576f..9e2debf 100644 ---...
2015 Oct 02
1
[PATCH] ruby: improve rdoc markup
...------ 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/generator/ruby.ml b/generator/ruby.ml index cd6678d..87bb34a 100644 --- a/generator/ruby.ml +++ b/generator/ruby.ml @@ -178,7 +178,7 @@ parse_flags (int argc, VALUE *argv) * Guestfs::Guestfs.new([{:environment => false, :close_on_exit => false}]) -> Guestfs::Guestfs * * Call - * +guestfs_create_flags+[http://libguestfs.org/guestfs.3.html#guestfs_create_flags] + * {guestfs_create_flags}[http://libguestfs.org/guestfs.3.html#guestfs_create_flags] * to create a new libguestfs handle. The handle is represented in * Rub...
2015 Sep 30
0
[PATCH 2/2] ocaml: Improve ocamldoc.
...ter ( @@ -192,9 +202,6 @@ end generate_ocaml_prototype alias style; ) non_c_aliases; - if not need_doc then - pr "(**/**)\n"; - pr "\n"; ) external_functions_sorted; @@ -223,23 +230,30 @@ end class guestfs : ?environment:bool -> ?close_on_exit:bool -> unit -> object method close : unit -> unit + (** See {!Guestfs.close} *) method set_event_callback : event_callback -> event list -> event_handle + (** See {!Guestfs.set_event_callback} *) method delete_event_callback : event_handle -> unit + (** See {!Guestfs....
2018 Feb 28
0
[PATCH] lib: Don't abort if a signal handler calls exit(2) during a guestfs_* function.
...p_next; guestfs_h **gg; - int r; - - if (g->state == NO_HANDLE) { - /* Not safe to call ANY callbacks here, so ... */ - fprintf (stderr, _("guestfs_close: called twice on the same handle\n")); - return; - } /* Remove the handle from the handles list. */ if (g->close_on_exit) { @@ -342,6 +335,45 @@ guestfs_close (guestfs_h *g) gl_lock_unlock (handles_lock); } + do_close (g, 0); +} + +static void +do_close (guestfs_h *g, int ignore_recursive) +{ + struct hv_param *hp, *hp_next; + int r; + + if (g->state == NO_HANDLE) { + /* Not safe to call ANY callb...
2015 Sep 30
3
[PATCH 1/2] ocaml: Use ocamlfind to run ocamldoc.
Using 'ocamlfind ocamldoc' is much faster than running 'ocamldoc' directly, because ocamlfind will run the native code program 'ocamldoc.opt' if it is available. This change approximately halves the time taken to compile the ocaml bindings. --- ocaml/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index
2016 Jun 07
0
[PATCH 2/2] ruby: tests: Give each test class and method a unique name.
...-17,8 +17,8 @@ require File::join(File::dirname(__FILE__), 'test_helper') -class TestLoad < MiniTest::Unit::TestCase - def test_create_flags +class Test030CreateFlags < MiniTest::Unit::TestCase + def test_030_create_flags g = Guestfs::Guestfs.new(:environment => false, :close_on_exit => true) refute_nil (g) g.parse_environment() diff --git a/ruby/t/tc_040_create_multiple.rb b/ruby/t/tc_040_create_multiple.rb index 16c67d3..e832989 100644 --- a/ruby/t/tc_040_create_multiple.rb +++ b/ruby/t/tc_040_create_multiple.rb @@ -17,8 +17,8 @@ require File::join(File::dirna...
2016 May 04
9
[PATCH 0/8] python: PEP 8 fixes
Hi, this series cleans up the Python sources, either static or generated, including also tests, to make them PEP 8 compliant; see https://www.python.org/dev/peps/pep-0008/ and tools like pep8. Almost all the issues reported by pep8 are fixed, reducing the issues from 3818 to 7. The changes should have no effect on the actual code, while it will help Python users with consistency with other
2016 Jun 07
3
[PATCH 1/2] ruby: Print exceptions thrown by event callbacks.
--- generator/ruby.ml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/generator/ruby.ml b/generator/ruby.ml index 97ccfdc..0f71ccc 100644 --- a/generator/ruby.ml +++ b/generator/ruby.ml @@ -404,15 +404,17 @@ event_callback_wrapper_wrapper (VALUE argvv) return Qnil; } +/* Callbacks aren't supposed to throw exceptions. We just print the + * exception on
2014 May 29
2
[PATCH] library: per-handle locking support
...of (*g)); if (!g) return NULL; + guestfs___per_handle_lock_add (g); + g->state = CONFIG; g->conn = NULL; @@ -305,6 +307,8 @@ guestfs_close (guestfs_h *g) return; } + guestfs___per_handle_lock_remove (g); + /* Remove the handle from the handles list. */ if (g->close_on_exit) { gl_lock_lock (handles_lock); diff --git a/src/locking.c b/src/locking.c new file mode 100644 index 0000000..2a35fce --- /dev/null +++ b/src/locking.c @@ -0,0 +1,162 @@ +/* libguestfs + * Copyright (C) 2009-2014 Red Hat Inc. + * + * This library is free software; you can redistribute it and/...
2010 Mar 13
1
klibc build trouble
as the next klibc release 1.5.16 looks like shaping up, I have a trouble to build that for Debian. currently I build depent on linux-libc-dev, I don't know what against I can build latest klibc, see klibc fails to build due too: make -C linux/ ARCH=x86_64 INSTALL_HDR_PATH=debian/tmp/usr/lib/klibc/ headers_install make[3]: *** No rule to make target `headers_install'. Stop. make[2]: ***
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
...val user_cancel : t -> unit generate_ocaml_prototype alias style; pr "\n"; ) non_c_aliases; - ) all_functions_sorted; + ) external_functions_sorted; pr "\ (** {2 Object-oriented API} @@ -203,7 +203,7 @@ class guestfs : ?environment:bool -> ?close_on_exit:bool -> unit -> object generate_ocaml_function_type style; pr "\n" ) non_c_aliases - ) all_functions_sorted; + ) external_functions_sorted; pr "end\n" @@ -268,7 +268,7 @@ let () = fun { name = name; style = style; non_c_aliases = non_...
2016 Sep 02
6
[PATCH 0/4] generator: Some work to split large C files
By splitting up large C files we can make parallel compiles a bit faster. Rich.
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...r ( - fun ({ name = name; style = style; non_c_aliases = non_c_aliases } as f) -> + fun ({ name; style; non_c_aliases } as f) -> generate_doc f (fun () -> generate_ocaml_prototype name style); (* Aliases. *) @@ -269,7 +269,7 @@ class guestfs : ?environment:bool -> ?close_on_exit:bool -> unit -> object "; List.iter ( - fun ({ name = name; style = style; non_c_aliases = non_c_aliases } as f) -> + fun ({ name; style; non_c_aliases } as f) -> let indent = " " in (match style with @@ -369,7 +369,7 @@ let () = (* The a...
2010 Mar 02
17
[PATCH 00/16] External building, update for 2.6.33 and multiple root devices.
The following patchset implements 3 seperate series of changes. External Building ================= Patches 1 through 8 enable to use of klibc's build system while leaving the src tree pristine (and potentially read only). Specifically: - srctree=<Sources for klibc> - objtree=<Ouput directory for klibc> - KLIBCKERNELSRC=<Kernel sources> - KLIBCKERNELOBJ=<Kernel
2017 Oct 04
11
[PATCH 0/9] build: Require OCaml >= 4.02.
Per my previous email: https://www.redhat.com/archives/libguestfs/2017-September/msg00203.html I'd like to talk about requiring a more modern version of the OCaml compiler. These commits show some of the code changes which would be possible with OCaml >= 3.12 [which it turns out we already require by accident] and also with OCaml >= 4.02. The latter is my favoured option. Rich.
2018 Mar 01
7
[PATCH v3 0/6] v2v: Add -o rhv-upload output mode.
v2 -> v3: - Lots of code cleanups. - Documentation. However this is still spooling the file into a temporary before the upload. It turns out that fixing this is going to require a small change to qemu. Rich.