From owner-freebsd-bugs Mon Nov 26 23:25:19 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from bambino.amt.ru (bambino.amt.ru [212.111.64.24]) by hub.freebsd.org (Postfix) with ESMTP id 6A11537B6DA for ; Mon, 26 Nov 2001 23:25:07 -0800 (PST) Received: (from root@localhost) by bambino.amt.ru (8.11.6/8.11.6) id fAR7PZ325047 for freebsd-bugs@FreeBSD.org.KAV; Tue, 27 Nov 2001 10:25:35 +0300 Received: from bakhtin.amt.ru (bakhtin.amt.ru [10.0.0.172]) by bambino.amt.ru (8.11.6/8.11.6) with ESMTP id fAR7PYd25039; Tue, 27 Nov 2001 10:25:34 +0300 Received: (from bakhtin@localhost) by bakhtin.amt.ru (8.11.6/8.11.6) id fAR7P5O06412; Tue, 27 Nov 2001 10:25:05 +0300 (MSK) (envelope-from bakhtin@amt.ru) X-Authentication-Warning: bakhtin.amt.ru: bakhtin set sender to bakhtin@amt.ru using -f X-Comment-To: iedowse@FreeBSD.org To: iedowse@FreeBSD.org Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/25474: dump can't close fifo pipe correctly References: <200111211843.fALIhFl64754@freefall.freebsd.org> Organization: AMT Group From: Alex Bakhtin Date: 27 Nov 2001 10:25:04 +0300 In-Reply-To: <200111211843.fALIhFl64754@freefall.freebsd.org> Message-ID: <81r8qk4qwf.fsf@bakhtin.amt.ru> Lines: 73 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Channel Islands) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >>>>> "i" == iedowse writes: Hi, i> Synopsis: dump can't close fifo pipe correctly i> State-Changed-From-To: open->feedback i> State-Changed-By: iedowse i> State-Changed-When: Wed Nov 21 10:41:10 PST 2001 i> State-Changed-Why: i> Could you supply a patch using the "-u" option to diff? Without i> some context it's difficult to see what is being changed. Making i> dump work with FIFOs seems like a useful addition. Np. The only change made is inside `trewind` function - if the file is a FIFO it's not necessary to execute the following code: --- while ((f = open(tape, 0)) < 0) sleep (10); --- ============= {bakhtin}/home/bakhtin/work/dump>diff -u tape.c /usr/src/sbin/dump/tape.c --- tape.c Thu Mar 1 16:53:00 2001 +++ /usr/src/sbin/dump/tape.c Mon Oct 8 20:26:16 2001 @@ -36,14 +36,13 @@ static char sccsid[] = "@(#)tape.c 8.4 (Berkeley) 5/1/95"; #endif static const char rcsid[] = - "$FreeBSD: src/sbin/dump/tape.c,v 1.12 1999/08/28 00:12:39 peter Exp $"; + "$FreeBSD: src/sbin/dump/tape.c,v 1.12.2.1 2001/08/01 06:29:35 obrien Exp $"; #endif /* not lint */ #include #include #include #include -#include #ifdef sunos #include @@ -323,7 +322,6 @@ { int f; int got; - struct stat sp; for (f = 0; f < SLAVES; f++) { /* @@ -366,9 +364,7 @@ return; } #endif - fstat(tapefd,&sp); (void) close(tapefd); - if(S_ISFIFO(sp.st_mode)) return; while ((f = open(tape, 0)) < 0) sleep (10); (void) close(f); @@ -385,7 +381,7 @@ (void)time((time_t *)&(tstart_changevol)); if (!nogripe) { msg("Change Volumes: Mount volume #%d\n", tapeno+1); - broadcast("CHANGE DUMP VOLUMES!\7\7\n"); + broadcast("CHANGE DUMP VOLUMES!\a\a\n"); } while (!query("Is the new volume mounted and ready to go?")) if (query("Do you want to abort?")) { {bakhtin}/home/bakhtin/work/dump> ============= -- Best regards, -- Alex Bakhtin, CCIE #8439 AMT Group, Cisco Systems Gold Partner, http://www.amt.ru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message