search for: onexit

Displaying 20 results from an estimated 50 matches for "onexit".

Did you mean: oneit
2007 Jul 18
0
[1117] trunk/wxruby2/swig/classes/App.i: No director for GetTopWindow, remove Unlink in OnExit to avoid exception
...decoration:none;display:block;padding:0 10px;} #patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, .info {color:#888;background:#fff;} --></style> <title>[1117] trunk/wxruby2/swig/classes/App.i: No director for GetTopWindow, remove Unlink in OnExit to avoid exception</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>1117</dd> <dt>Author</dt> <dd>brokentoy</dd> <dt>Date</dt> <dd>2007-07-18 04:16:06 -0400 (Wed, 18 Jul 2007)&...
2013 Nov 03
1
on.exit() & sys.on.exit(): Calling them via eval() does not work as hoped
...to "record" on.exit() expressions via eval(). It appears that the "primitives" on.exit() and sys.on.exit() do something rather special. Is there a solution to what I'm trying to do? The reason why I'm doing this in the first place, is that I'm trying to implement onExit(<expr>, where="replace"), onExit(<expr>, where="last"), and onExit(<expr>, where="first"). Thanks, Henrik
2004 May 03
1
Finalization and external pointers
...hen the window should know not to change that pointer to NULL later. Are there other examples like this I can look at? I'd like to follow existing conventions rather than invent my own. And a related question: is there a writeup anywhere on the R_RegisterFinalizerEx function? What does the onexit argument do? Duncan Murdoch
2016 Sep 18
0
getGraphicsEvent() and setTimeLimit() bug and compatibility patch.
...ll, the values set with setTimeLimit() are checked in R_ProcessEvents(), which is defined separately in gnuwin32/system.c and unix/sys-unix.c. If a time limit is exceeded, it error()s out. That in turn percolates up and through jump_to_top_ex(), as defined in main/errors.c, which eventually calls GEonExit() in main/engine.c, a function meant to reset some state on graphics devices and which from the look of it and its comments was added to fix a similar bug with recordGraphics(). I've added a single line to GEonExit(), to also reset gettingEvent back to FALSE, which seems to have no side effect...
2002 Nov 09
1
Calling function with proto in Rinternals.h
(Tried this query on r-help with no luck, maybe someone here can help?) I would like to call the 'RFinalizerEx' function that appears in Rinternals.h using ".Call". It worked for me in the past, but now I get an error message something like: 'call function name not in call table'. I'm using the 1.6.1 rpm from CRAN. Anyone know what's going on? Thanks. Tim --
2014 Jan 25
0
[klibc:master] auxv: convert auxiliary vector into an array; define getauxval()
...5,12 +36,14 @@ char **environ; unsigned int __page_size, __page_shift; struct auxentry { - uintptr_t type; - uintptr_t v; + unsigned long type; + unsigned long v; }; extern void __init_stdio(void); +unsigned long __auxval[_AUXVAL_MAX]; + __noreturn __libc_init(uintptr_t * elfdata, void (*onexit) (void)) { int argc; @@ -76,20 +79,16 @@ __noreturn __libc_init(uintptr_t * elfdata, void (*onexit) (void)) auxentry = (struct auxentry *)(envend + 1); while (auxentry->type) { - switch (auxentry->type) { -#if SHARED - case AT_ENTRY: - MAIN = (main_t) (auxentry->v); - break;...
2020 Feb 05
2
[fdo] Detect my own session being closed
...partition, thus allowing other users to use it? About this last question: I already tried to connect to the SessionRemoved signal from logind, but with no luck: I receive the signal when other users close their session, but my program is killed before it can process the signal. Also I tried to use onexit(), atexit(), and GApplication's close signals, but also with no luck: the code isn't called (I'm using GTK, and the program always dies with a 'broken pipe' message when the session is closed). Thanks in advance. -- Nos leemos RASTER (Linux user #228804)...
2004 Jun 10
1
tryCatch() and preventing interrupts in 'finally'
With tryCatch() it is possible to catch interrupts with tryCatch(). Then you can use a 'finally' statement to clean up, release resources etc. However, how can I "protect" against additional interrupts? This is a concern when the hold down Ctrl+C and generates a sequence of interrupts. Example: tryCatch({ cat("Press Ctrl+C...\n"); Sys.sleep(5); }, interrupt =
2014 Oct 27
1
proper use of reg.finalizer to close connections
...red-down example package with a single R file, it looks something like: ##### BEGIN PACKAGE CODE ##### .CONNS <- new.env(parent = emptyenv()) .CONNS$resource1 <- NULL .CONNS$resource2 <- NULL ## some more .CONNS resources... reg.finalizer(.CONNS, function(x) sapply(names(x), disconnect), onexit = TRUE) connect <- function(x) { ## here lies code to connect and update .CONNS[[x]] } disconnect <- function(x) { print(sprintf("disconnect(%s)", x)) ## here lies code to disconnect and update .CONNS[[x]] } ##### END PACKAGE CODE ##### The print(...) statement in disconnect...
2014 Apr 09
0
[klibc:master] Move architecture-specific initialization to arch/
...__shared_init.c */ @@ -40,7 +41,8 @@ struct auxentry { unsigned long v; }; -extern void __init_stdio(void); +extern void __libc_init_stdio(void); +extern void __libc_archinit(void); unsigned long __auxval[_AUXVAL_MAX]; @@ -90,20 +92,11 @@ __noreturn __libc_init(uintptr_t * elfdata, void (*onexit) (void)) __page_size = page_size = __auxval[AT_PAGESZ]; -#ifdef __i386__ - { - extern void (*__syscall_entry)(int, ...); - if (__auxval[AT_SYSINFO]) - __syscall_entry = (void (*)(int, ...)) - __auxval[AT_SYSINFO]; - } -#endif - #if __GNUC__ >= 4 /* unsigned int is 32 bits on all...
2004 Jun 04
2
building wxruby-swig 0.0.16 on Mac
Grabbed 0.0.16 and tried a build for kicks. ...all good, except for a warning in MenuBar.cpp, then... g++ -c -I/usr/local/lib/wx/include/mac-2.4 -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fno-common -fno-common -pipe -fno-common -x objective-c++ -I /usr/local/lib/ruby/gems/1.8/rake-0.3.2/lib -I /usr/local/lib/ruby/site_ruby/1.8 -I
2020 Feb 06
2
[fdo] Detect my own session being closed
...gt; > About this last question: I already tried to connect to the > SessionRemoved signal from logind, but with no luck: I receive the > signal when other users close their session, but my program is > killed before it can process the signal. Also I tried to use > onexit(), atexit(), and GApplication's close signals, but also > with no luck: the code isn't called (I'm using GTK, and the > program always dies with a 'broken pipe' message when the session > is closed). > > Thanks in advance. > > -- >...
2007 Jan 05
0
[826] trunk/wxruby2/swig: Move RubyStockObjects back to App.i to avoid lots of error msg on GTK
...&nbsp&nbsp&nbsp&nbsp Init_wxRubyStockObjects(); + </ins><span class="cx"> return result; </span><span class="cx"> } </span><span class="cx"> </span><span class="cx"> virtual int OnExit() </span><span class="cx"> { </span><ins>+ + </ins><span class="cx"> #ifdef __WXDEBUG__ </span><span class="cx"> printf("OnExit...\n"); </span><span class="cx"> #endif&n...
2007 Mar 19
0
[898] branches/wxruby2/wxwidgets_282/swig/classes/App.i: Fix init of stock objects for Wx2.8 - was causing infinite loop +crash on OS X
...p&nbsp&nbsp&nbsp&nbsp&nbspreturn true; +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp } </ins><span class="cx"> } </span><span class="cx"> </span><span class="cx"> virtual int OnExit() </span><span class="lines">@@ -123,13 +123,6 @@ </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspprintf("ASSERT fired\n");...
2016 Sep 16
1
getGraphicsEvent() questions, minor feature/tweak request, and patch(es).
...!isString(prompt) || !length(prompt)) error(_("invalid prompt")); + if ((!isString(prompt) || !length(prompt)) && (TYPEOF(prompt) != LGLSXP || asChar(prompt) != R_NaString)) error(_("invalid prompt")); /* NB: cleanup of event handlers must be done by driver in onExit handler */ @@ -159,8 +159,10 @@ if (!count) error(_("no graphics event handlers set")); - Rprintf("%s\n", CHAR(asChar(prompt))); - R_FlushConsole(); + if (TYPEOF(prompt) != LGLSXP || asChar(prompt) != R_NaString) { + Rprintf("%s\n", CHAR(asChar(pr...
2023 Mar 05
0
[klibc:master] Add LoongArch64 port
...arch-specific initialization and invokes __libc_init # with the appropriate arguments. @@ -11,12 +11,8 @@ #include <machine/asm.h> ENTRY(_start) - .option push - .option norelax - lla gp, __global_pointer$ - .option pop - - mv a0, sp # Pointer to ELF entry structure - mv a1, zero # No onexit pointer - jal __libc_init + move $a0, $sp # Pointer to ELF entry structure + move $a1, $zero # No onexit pointer + bstrins.d $sp, $zero, 3, 0 # Align stack to 16 bytes + bl __libc_init END(_start) diff --git a/usr/klibc/arch/loongarch64/setjmp.S b/usr/klibc/arch/loongarch64/setjmp.S new file...
2020 Apr 03
0
The finalizer of the externalPtr does not work when closing R?
See R_RegisterCFinalizerEx() and set onexit to nonzero. Here: https://github.com/wch/r-source/blob/9353ddfa8d30069ad8975e0364307d710f2488d5/src/include/Rinternals.h#L1279-L1280 Gabor On Fri, Apr 3, 2020 at 1:56 PM Wang Jiefei <szwjf08 at gmail.com> wrote: > > Hi all, > > I found that the finalizer of the externalPtr is no...
2006 Apr 10
2
Run package code on R shutdown?
I'm sure I've seen this discussed before, but haven't been able to find it. I'd like some package code to be run when R is shut down (approximately when a user's .Last function would be run), to clean up properly. What is the best way to do this? Duncan Murdoch
2003 Nov 28
2
[PATCH] update crt0.S on ppc32
The _start stuff was changed some time ago, but ppc was not updated. This fixes klibc for me. I'm not sure what to do with the second arg to __libc_init, so I set it to 0.. However, looking at other static binaries, there is more stuff todo. diff -p -purNx linux -x '.*.d' -x syscalls -x socketcalls y/klibc-0.87/klibc/arch/ppc/crt0.S klibc-0.87/klibc/arch/ppc/crt0.S ---
2014 Jan 25
0
[klibc:master] i386: use the vdso for system calls on i386
...t $0x80 /* DO NOT call the vdso here! */ pushl %edx cmpl $-4095, %eax jae 1f diff --git a/usr/klibc/libc_init.c b/usr/klibc/libc_init.c index 1087f95..1c6180b 100644 --- a/usr/klibc/libc_init.c +++ b/usr/klibc/libc_init.c @@ -90,6 +90,15 @@ __noreturn __libc_init(uintptr_t * elfdata, void (*onexit) (void)) __page_size = page_size = __auxval[AT_PAGESZ]; +#ifdef __i386__ + { + extern void (*__syscall_entry)(int, ...); + if (__auxval[AT_SYSINFO]) + __syscall_entry = (void (*)(int, ...)) + __auxval[AT_SYSINFO]; + } +#endif + #if __GNUC__ >= 4 /* unsigned int is 32 bits on all...