search for: at_exit

Displaying 20 results from an estimated 104 matches for "at_exit".

2015 Aug 28
1
Re: [PATCH v2 01/17] v2v: debug gc via at_exit hook
...> > On Tue, Aug 11, 2015 at 08:00:20PM +0300, Roman Kagan wrote: > > > > > debub_gc (coming from the command line) indicates that gc should be > > > > > forced on program exit. Instead of sticking it on every exit path, > > > > > register it as an at_exit hook once. > > > > > > > > Was this change necessary as part of this patch series? > > > > > > I think so. > > > > > > The goal of the refactoring part of the series was to reduce the amount > > > of detail in main(), and only...
2015 Aug 27
2
Re: [PATCH v2 01/17] v2v: debug gc via at_exit hook
On Tue, Aug 11, 2015 at 08:00:20PM +0300, Roman Kagan wrote: > debub_gc (coming from the command line) indicates that gc should be > forced on program exit. Instead of sticking it on every exit path, > register it as an at_exit hook once. Was this change necessary as part of this patch series? The --debug-gc option is used across most of the virt-* tools in the internal tests, and those tests shouldn't exit with an error when the option is used. Anyway, I'd just drop this patch from the series and if it's n...
2015 Aug 11
0
[PATCH v2 01/17] v2v: debug gc via at_exit hook
debub_gc (coming from the command line) indicates that gc should be forced on program exit. Instead of sticking it on every exit path, register it as an at_exit hook once. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> --- v2v/v2v.ml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 7c47ea0..9cb4a27 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -55,6 +55,9 @@ let rec main () = printf &qu...
2015 Aug 27
0
Re: [PATCH v2 01/17] v2v: debug gc via at_exit hook
...15 at 03:50:11PM +0100, Richard W.M. Jones wrote: > On Tue, Aug 11, 2015 at 08:00:20PM +0300, Roman Kagan wrote: > > debub_gc (coming from the command line) indicates that gc should be > > forced on program exit. Instead of sticking it on every exit path, > > register it as an at_exit hook once. > > Was this change necessary as part of this patch series? I think so. The goal of the refactoring part of the series was to reduce the amount of detail in main(), and only leave coarse steps, making it easy to see the whole scenario. Originally every exit path had a clause...
2015 Aug 28
0
Re: [PATCH v2 01/17] v2v: debug gc via at_exit hook
...es wrote: > > > On Tue, Aug 11, 2015 at 08:00:20PM +0300, Roman Kagan wrote: > > > > debub_gc (coming from the command line) indicates that gc should be > > > > forced on program exit. Instead of sticking it on every exit path, > > > > register it as an at_exit hook once. > > > > > > Was this change necessary as part of this patch series? > > > > I think so. > > > > The goal of the refactoring part of the series was to reduce the amount > > of detail in main(), and only leave coarse steps, making it easy...
2015 Aug 27
2
Re: [PATCH v2 01/17] v2v: debug gc via at_exit hook
...00, Richard W.M. Jones wrote: > > On Tue, Aug 11, 2015 at 08:00:20PM +0300, Roman Kagan wrote: > > > debub_gc (coming from the command line) indicates that gc should be > > > forced on program exit. Instead of sticking it on every exit path, > > > register it as an at_exit hook once. > > > > Was this change necessary as part of this patch series? > > I think so. > > The goal of the refactoring part of the series was to reduce the amount > of detail in main(), and only leave coarse steps, making it easy to see > the whole scenario. &gt...
2015 Aug 28
1
[PATCH] handle --debug-gc universally via at_exit hook
Several tools handle --debug-gc command-line option, by explicitly forcing GC on every exit path. This is tedious and prone to forgetting some of the exit paths. Instead, add a generic handler for --debug-gc, which installs an at_exit hook to do the GC consistency check, and which can be called right in the command-line parser. Also adjust all users of --debug-gc to use that handler. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> --- customize/customize_main.ml | 9 ++------- mllib/common_utils.ml | 4 ++++ m...
2008 Jan 31
4
RSpec-1.1.3
...for "should_not render_template" to rspec_on_rails. Closes #241. * Added --pattern (-p for short) option to control what files get loaded. Defaults to ''**/*_spec.rb'' * Exit with non-0 exit code if examples *or tests* (in test/unit interop mode) fail. Closes #203. * Moved at_exit hook to a method in Spec::Runner which only runs if specs get loaded. Closes #242. * Applied patch from kakutani ensuring that base_view_path gets cleared after each view example. Closes #235. * More tweaks to regexp step names * Fixed focused specs in nested ExampleGroups. Closes #225. More info...
2001 May 11
1
Problems with OpenSSH2.9p1 on Linux/Sparc
...packet_disconnect("socket: %.100s", strerror(saved)); --- 2623,2633 ---- snprintf(channel_forwarded_auth_socket_name, MAX_SOCKET_NAME, "%s/agent.%d", channel_forwarded_auth_socket_dir, (int) getpid()); ! /* This is bad...on_exit requires 2 parameters, whereas ! at_exit only takes one. Field 2 is arguments, so let's ! see if we can fool it by passing null - Corey 5/11/01 */ ! /* if (atexit(cleanup_socket) < 0) { */ ! if (on_exit(cleanup_socket, NULL) < 0) { int saved = errno; cleanup_socket(); packet_disconnect("socket: %.100s&q...
2009 Jan 05
7
[Cucumber] after feature hook?
Hi, Is there a hook or a method to execute some code after a whole feature has run or will I need to embed that in a ''Then''? Regards Aidy
2016 May 03
1
[PATCH] mllib: add "internal" to the description of --{short, long}-options
...n_utils.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 3d6eb94..db8a298 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -575,8 +575,8 @@ let set_standard_options argspec = let set_debug_gc () = at_exit (fun () -> Gc.compact()) in let argspec = [ - "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options"; - "--long-options", Arg.Unit display_long_options, " " ^ s_"List long options"; + "--short-o...
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, to keep run_command working also in older OCaml version then > manually search for the existance of the given executable, exiting with > code 127 (as a shell does) in this case. > > [1]...
2007 May 19
1
Worker cleanup and TTL
Hello. I read in an old announcement by Ezra, relating to the older version of BackgrounDRb, about workers being able to clean up after themselves and a TTL feature. I''m not sure if these things are present in the newer version. I''ve tried overriding the delete method in my worker but when I call delete_worker, the method doesn''t appear to be called. Is there a right
2015 Mar 12
1
[PATCH] generator: small optimization of pod2text cache memoization
...dated () = +let pod2text_memo_unsaved_count = ref 0 +let pod2text_memo_atexit = ref false +let pod2text_memo_save () = let chan = open_out pod2text_memo_filename in output_value chan pod2text_memo; close_out chan +let pod2text_memo_updated () = + if not (!pod2text_memo_atexit) then ( + at_exit pod2text_memo_save; + pod2text_memo_atexit := true; + ); + pod2text_memo_unsaved_count := !pod2text_memo_unsaved_count + 1; + if !pod2text_memo_unsaved_count >= 100 then ( + pod2text_memo_save (); + pod2text_memo_unsaved_count := 0; + ) (* Useful if you need the longdesc POD text...
2008 Jan 18
2
CC.rb and RSpec
When trying to configure a rspec 1.1.2 based app in CC.rb, I came across the following: /home/bryan/cruisecontrolrb-1.2.1/projects/support-engines/work/vendor/ plugins/rspec_on_rails/lib/spec/rails/../../../../rspec/lib/spec/ runner/options.rb:218:in `files_to_load'': File or directory not found: cc:build (RuntimeError) from
2007 May 29
2
Selenium, Spec:Ui and ... forks?
I am using Spec:UI to run my Selenium tests, and I want to start Selenium only once, for many descriptions. I''ve come quite far solving it by declaring a main ui spec like the following: require ''pathname'' require File.dirname(__FILE__) + ''/selenium'' $base_url="http://localhost:3000" $browser =
2006 Oct 26
2
shutdown listener
I start up an external process when I start my rails environment. I currently do this in config/environment.rb by forking a process and recording it''s process id in log/foo.pid, I''d like to kill that process when I close mongrel. Is there an API in mongrel for responding to the shutdown event? Or do I need to listen for the term signal and do my clean up that way? Thanks,
2015 Aug 11
0
[PATCH v2 04/17] v2v: factor out populating targets list
...t_name, print_source, root_choice = - Cmdline.parse_cmdline () in - - (* Print the version, easier than asking users to tell us. *) - if verbose () then - printf "%s: %s %s (%s)\n%!" - prog Config.package_name Config.package_version Config.host_cpu; - - if debug_gc then - at_exit (fun () -> Gc.compact()); - - let source = open_source input print_source in - let source = amend_source source output_name network_map in - let overlays = create_overlays source.s_disks in - - (* Open the guestfs handle. *) - message (f_"Opening the overlay"); - let g = new G.gu...
2007 Feb 16
1
Starting / stopping background rb when apache starts/stops
Hello - I would like to figure out a way to have backgroundrb start/stop with the same UID that dispatch.fcgi uses, at the same point in time that apache is started/stopped. I see a technique that seems plausable in this archive message: http://rubyforge.org/pipermail/backgroundrb-devel/2007-February/000723.html which addresses the starting aspect, in a lazy fashion. That seems fine,
2015 Aug 11
0
[PATCH v2 02/17] v2v: factor out opening input VM
...t_name, print_source, root_choice = - Cmdline.parse_cmdline () in - - (* Print the version, easier than asking users to tell us. *) - if verbose () then - printf "%s: %s %s (%s)\n%!" - prog Config.package_name Config.package_version Config.host_cpu; - - if debug_gc then - at_exit (fun () -> Gc.compact()); - +let open_source input print_source = message (f_"Opening the source %s") input#as_options; let source = input#source () in @@ -68,7 +54,6 @@ let rec main () = printf "%s\n" (string_of_source source); exit 0 ); - if verbose...