Date: Mon, 6 Mar 1995 00:30:02 -0800 From: J Wunsch <j@uriah.heep.sax.de> To: freebsd-bugs Subject: misc/233: CTM sometimes does not fully clean up internally Message-ID: <199503060830.AAA26146@freefall.cdrom.com> In-Reply-To: Your message of Mon, 6 Mar 1995 09:15:22 %2B0100 <199503060815.JAA04706@uriah.heep.sax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
>Number: 233 >Category: misc >Synopsis: CTM sometimes does not fully clean up internally >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs (FreeBSD bugs mailing list) >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 6 00:30:01 1995 >Originator: J Wunsch >Organization: >Release: FreeBSD 2.1.0-Development i386 >Environment: >Description: ctm(1) sometimes did not free up all used resources (open pipes and processes, heap memory). This happened whenever one of the passes ended prematurely, and it became very apparent when running it on a bunch of already applied deltas, resulting in a ``gunzip: resource temporarily unavailable'' due to the maxproc # exhausted. >How-To-Repeat: Run ctm(1) with a reasonable number of .gz input deltas and the default maxproc limit of 40. >Fix: Index: ctm.c =================================================================== RCS file: /usr/home/cvs/src/usr.sbin/ctm/ctm/ctm.c,v retrieving revision 1.8 diff -u -r1.8 ctm.c --- 1.8 1995/03/04 20:36:45 +++ ctm.c 1995/03/06 08:05:30 @@ -164,8 +164,8 @@ if(!p) rewind(f); - if((i=Pass1(f, applied))) - return i; + if((i=Pass1(f, applied))) + goto exit_and_close; if(!p) { rewind(f); @@ -187,16 +187,18 @@ if(i) { if((!Force) || (i & ~Exit_Forcible)) - return i; + goto exit_and_close; } if(CheckIt) { fprintf(stderr,"All checks out ok.\n"); - return Exit_Done; + i = Exit_Done; + goto exit_and_close; } i=Pass3(f); +exit_and_close: if(!p) { fclose(f); } else { >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503060830.AAA26146>