search for: cleanup

Displaying 20 results from an estimated 8563 matches for "cleanup".

Did you mean: cleanups
2017 Jun 15
0
[PATCH v6 05/41] utils: Split out cleanups into common/cleanups.
Those cleanups which only depend on libc, gnulib or libxml2 are split out into a separate common/cleanups directory. --- .gitignore | 3 +- Makefile.am | 4 +- align/Makefile.am | 2 + builder/Make...
2019 Apr 23
0
[nbdkit PATCH 1/4] cleanup: Move cleanup.c to common
The CLEANUP_FREE macro and friends can be useful to filters and in-tree plugins; as such, move them to common/ so more than just the server/ code can take advantage of our compiler magic. Signed-off-by: Eric Blake <eblake@redhat.com> --- common/utils/cleanup.h | 48 +++++++++++++++++++++++++...
2018 Sep 13
0
[PATCH v2 nbdkit 4/5] tests: Use a generic cleanup mechanism instead of explicit trap.
...changed, 73 insertions(+), 157 deletions(-) diff --git a/tests/functions.sh.in b/tests/functions.sh.in index 62fdfe5..42e3925 100644 --- a/tests/functions.sh.in +++ b/tests/functions.sh.in @@ -32,6 +32,31 @@ # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. +# cleanup_fn f [args] +# +# A generic trap handling function. This runs the function f + args +# when the script exits for any reason. +declare -a _cleanup_hook +cleanup_fn () +{ + _cleanup_hook[${#_cleanup_hook[@]}]="$@" +} + +_run_cleanup_hooks () +{ + status=$? + set +e + trap '...
2019 Apr 23
1
[RFC: nbdkit PATCH] cleanup: Assert mutex sanity
Although we haven't always checked that pthread_mutex_[un]lock succeeded, it never hurts to avoid blatant programming bugs such as when EINVAL can detect use of an uninitialized mutex. Signed-off-by: Eric Blake <eblake@redhat.com> --- Applies on top of my series to move cleanup.c to common/ Should I also go through and add checking to other bare pthread_mutex_[un]lock() calls? common/utils/cleanup.h | 5 ++++- common/utils/cleanup.c | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/utils/cleanup.h b/common/utils/cleanup.h index e6e6140..0ab...
2018 Aug 01
1
[PATCH nbdkit] tests: Cancel trap in cleanup function to avoid recursive traps.
In these test functions, when a test fails, the bash ‘trap’ command causes the cleanup function to be called. However bash does not annul or cancel the traps when cleanup is called, so at the end of the cleanup function when ‘exit’ is called, cleanup is called recursively. Avoid this by cancelling the traps at the top of the cleanup function. Also an extra debugging message is emit...
2015 Sep 03
2
[RFC] New pass: LoopExitValues
...I understand the mechanics, but I still can't quite see what > patterns it would be useful on. You've mentioned matrix multiply - how does > this pass alter the IR? Here's before and after IR for the matrix_mul example. Notice the two bitcasts %1 and %2 generated in the for.cond.cleanup block. The L.E.V pass converts these to scevgep values that already exist. *** Code after LSR *** ; Function Attrs: nounwind optsize define void @matrix_mul(i32 %Size, i32* nocapture %Dst, i32* nocapture readonly %Src, i32 %Val) #0 { entry: %cmp.25 = icmp eq i32 %Size, 0 br i1 %cmp.25, label...
2011 Feb 11
1
[PATCH 2/3]: Staging: hv: Use native wait primitives
...goto errorout; - } + init_waitqueue_head(&openInfo->waitevent); openMsg = (struct vmbus_channel_open_channel *)openInfo->msg; openMsg->header.msgtype = CHANNELMSG_OPENCHANNEL; @@ -280,8 +278,15 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, goto Cleanup; } - /* FIXME: Need to time-out here */ - osd_waitevent_wait(openInfo->waitevent); + openInfo->wait_condition = 0; + wait_event_timeout(openInfo->waitevent, + openInfo->wait_condition, + msecs_to_jiffies(1000)); + if (openInfo->wait_condition == 0) { + err = -ETIMEDOUT; + g...
2011 Feb 11
1
[PATCH 2/3]: Staging: hv: Use native wait primitives
...goto errorout; - } + init_waitqueue_head(&openInfo->waitevent); openMsg = (struct vmbus_channel_open_channel *)openInfo->msg; openMsg->header.msgtype = CHANNELMSG_OPENCHANNEL; @@ -280,8 +278,15 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, goto Cleanup; } - /* FIXME: Need to time-out here */ - osd_waitevent_wait(openInfo->waitevent); + openInfo->wait_condition = 0; + wait_event_timeout(openInfo->waitevent, + openInfo->wait_condition, + msecs_to_jiffies(1000)); + if (openInfo->wait_condition == 0) { + err = -ETIMEDOUT; + g...
2014 Aug 11
5
issue when building/making package from git
...and install packages not in the official repos. When running $ makepkg I have this structure which sounds correct: libguestfs-git/pkg/ libguestfs-git/src/AllNeededDir_cloned_here but at one time the build breaks with these errors: ----------------------------- ../src/.libs/libutils.a( libutils_la-cleanup.o): In function `guestfs___cleanup_xmlBufferFree': cleanup.c:(.text+0x79): undefined reference to `xmlBufferFree' ../src/.libs/libutils.a(libutils_la-cleanup.o): In function `guestfs___cleanup_xmlFreeDoc': cleanup.c:(.text+0x99): undefined reference to `xmlFreeDoc' ../src/.libs/libu...
2017 Jun 19
2
Re: [PATCH v6 05/41] utils: Split out cleanups into common/cleanups.
On Friday, 16 June 2017 16:58:53 CEST Richard W.M. Jones wrote: > On Fri, Jun 16, 2017 at 03:24:55PM +0200, Pino Toscano wrote: > > On Thursday, 15 June 2017 19:05:55 CEST Richard W.M. Jones wrote: > > > Those cleanups which only depend on libc, gnulib or libxml2 are split > > > out into a separate common/cleanups directory. > > > --- > > > > IMHO a single cleanups.c source should be enough, otherwise it's overly > > split... > > I think you do need to split it. T...
2010 Jan 13
1
[LLVMdev] invoke/unwind
On 01/13/2010 02:07 AM, Duncan Sands wrote: > Hi Dustin, the code generators do not support unwind, only the > interpreter does. Ah, the secret is not to even try to frob the gnorts. Manual unwinding, here I come. :-( I was going to say the interpreter doesn't either, but then I recalled it JITs when it can. I don't know how to call into libc from the interpreter to test that.
2011 Sep 27
3
[LLVMdev] How to code catch-all in the new exception handling scheme?
...now correct. Please check. :) > > I still have some niggles: > > The unwinder delegates the decision of whether to stop in a call frame to > that call frame's language-specific personality function. Not all personality > functions guarantee that they will stop to perform cleanups. > > This is incorrect: it is not the personality function that makes the decision, > it is who-ever is doing the unwinding. For example if you use the Ada "throw" > method it will always run all C++ cleanups, even if that's all there is to do. > While if you use the...
2006 Feb 20
2
formatting results from a function argument
Hello all, I have a simple function which calculates summary statistics of a dataset in terms of a factor (say area). > x = data.frame(Area = c(rep("cleanup", 5), rep("ref", 5)), TcCB = c(rnorm(5)+2, rnorm(5)));x Area TcCB 1 cleanup 2.5829747 2 cleanup 2.6796868 3 cleanup 2.5437094 4 cleanup 2.8453616 5 cleanup 1.1789683 6 ref 1.0140391 7 ref -0.8433729 8 ref 0.6512422 9 ref 0.2341083 10 r...
2011 Sep 27
3
[LLVMdev] How to code catch-all in the new exception handling scheme?
..._personality_v0 catch i8* @_ZTIi catch i8* null A 'null' value is C++'s way of saying "this is a catch-all". Ada uses a global variable (function?) for this. To the new EH scheme, they are indistinguishable from a "normal" catch. > To get a cleanup add the "cleanup" flag to the landingpad instruction. That > said, I'm ruminating on whether the cleanup flag should be removed: instead > there would always be an implicit cleanup. As an optimization, the code > generators would not output a cleanup into the exception hand...
2011 Sep 27
0
[LLVMdev] How to code catch-all in the new exception handling scheme?
...; > I *think* this is now correct. Please check. :) I still have some niggles: The unwinder delegates the decision of whether to stop in a call frame to that call frame's language-specific personality function. Not all personality functions guarantee that they will stop to perform cleanups. This is incorrect: it is not the personality function that makes the decision, it is who-ever is doing the unwinding. For example if you use the Ada "throw" method it will always run all C++ cleanups, even if that's all there is to do. While if you use the C++ throw method it won&...
2017 Jun 16
2
Re: [PATCH v6 05/41] utils: Split out cleanups into common/cleanups.
On Thursday, 15 June 2017 19:05:55 CEST Richard W.M. Jones wrote: > Those cleanups which only depend on libc, gnulib or libxml2 are split > out into a separate common/cleanups directory. > --- IMHO a single cleanups.c source should be enough, otherwise it's overly split... -- Pino Toscano
2003 Jan 24
1
[patch] Still a problem with cleanup.c
Hello, There is still a problem with the _exit_cleanup() function in cleanup.c despite the patch that was put in last week that prevented recursion. It turns out that sometimes multiple calls in close sequence are done and this causes rsync to spin out of control instead of exiting. This bug was found by Marc Espie and the patch I'm including i...
2013 Mar 04
1
[PATCH] fuse: Add guestmount-cleanup program to handle unmounting (RHBZ#916780).
...ns that it cannot be used outside guestmount, specifically by programs that use the mount-local API[1] directly. (For various reasons 'guestfs_umount_local' isn't a usable API in most situations). My second implementation is the patch attached. It adds a new program called guestmount-cleanup which can be used two ways: guestmount-cleanup --fd=<FD> mountpoint where it will monitor the pipe file descriptor <FD>. (I should note that I've never actually tested this code path). Or: guestmount-cleanup mountpoint where it immediately unmounts the mountpoint. In both c...
2010 Jun 04
1
Suggested change to build.pl
Under Linux the cleanup script (if it exists) is run at the end, before the package archive is created, and this prevents intermediate files that are no longer needed from being written to the archive. Unfortunately, this does not happen under Windows when there is a cleanup.win. That is, cleanup.win is not run before th...
2011 Sep 28
0
[LLVMdev] How to code catch-all in the new exception handling scheme?
Hi Bill, >> The unwinder delegates the decision of whether to stop in a call frame to >> that call frame's language-specific personality function. Not all personality >> functions guarantee that they will stop to perform cleanups. I was talking about who decides what to do if there are only cleanups all the way up the stack (in C++ the program is terminated without running the cleanups; in Ada the program is terminated after running the cleanups). The language "throw" routine decides this, not the personality f...