Date: Thu, 1 Mar 2001 17:13:14 +0300 (MSK) From: bakhtin@amt.ru To: FreeBSD-gnats-submit@freebsd.org Subject: bin/25474: dump can't close fifo pipe correctly Message-ID: <200103011413.f21EDE201343@bakhtin.amt.ru>
next in thread | raw e-mail | index | archive | help
>Number: 25474 >Category: bin >Synopsis: dump can't close fifo pipe correctly >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 01 06:20:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Alex Bakhtin >Release: FreeBSD 4.2-STABLE i386 >Organization: AMT Group >Environment: {bakhtin}/home/bakhtin/work/dump>uname -a FreeBSD bakhtin.amt.ru 4.2-STABLE FreeBSD 4.2-STABLE #1: Tue Feb 6 17:26:00 MSK 2001 root@bakhtin.amt.ru:/mnt/srcs/src/sys/compile/BAKHTIN i386 >Description: I'm trying to dump my filesystems to fifo pipe (created by mkfifo) and have got a problem. If we use dump -f FILE and FILE is fifo, it dumps fs fine, but after that it fails to close this file. Looking into dump sources (tape.c file) I have found a problem: after closing the file it tries to reopen it several times: while ((f = open(tape, 0)) < 0) sleep (10); (void) close(f); And because nobody is listening at the other end of this pipe, we'll wait for a long time... >How-To-Repeat: mkfifo PIPE dd if=PIPE of=/dev/null& dump -0 -f PIPE / >Fix: {bakhtin}/home/bakhtin/work/dump>diff tape.c /usr/src/sbin/dump/tape.c 46d45 < #include !<sys/stat.h!> 326d324 < struct stat sp; 369d366 < fstat(tapefd,&sp); 371d367 < if(S_ISFIFO(sp.st_mode)) return; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103011413.f21EDE201343>