From owner-freebsd-current Fri Aug 9 16: 7:33 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 464CB37B400 for ; Fri, 9 Aug 2002 16:07:31 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 06A6643E65 for ; Fri, 9 Aug 2002 16:07:30 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 10 Aug 2002 00:07:28 +0100 (BST) To: Alexander Leidinger Cc: bhlewis@wossname.net, freebsd-current@FreeBSD.ORG Subject: Re: Is anyone else having trouble with dump(8) on -current? In-Reply-To: Your message of "Tue, 14 May 2002 12:34:12 +0200." <200205141034.g4EAYCJr024857@Magelan.Leidinger.net> Date: Sat, 10 Aug 2002 00:07:28 +0100 From: Ian Dowse Message-ID: <200208100007.aa02493@salmon.maths.tcd.ie> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [replying to an old message] In message <200205141034.g4EAYCJr024857@Magelan.Leidinger.net>, Alexander Leidi nger writes: >On 7 Mai, Benjamin Lewis wrote: >> | DUMP: slave couldn't reopen disk: Interrupted system call > >Try the attached patch. I also have a similar patch for restore. I don't >like the patch, I think I should use SA_RESTART with sigaction(), so >think about this patch as a proof of concept (if it solves your >problem). I was just looking at PR bin/18319 when I remembered this message. Many of the changes in your patch are not necessary I believe, as read(2) will restart after a signal by default. How about just fixing the open call that actually triggers the reported error? I suspect that many of the other cases are either impossible or extremely unlikely in practice. Could someone who can reproduce the "couldn't reopen disk" error try the following? Ian Index: tape.c =================================================================== RCS file: /dump/FreeBSD-CVS/src/sbin/dump/tape.c,v retrieving revision 1.22 diff -u -r1.22 tape.c --- tape.c 8 Jul 2002 00:29:23 -0000 1.22 +++ tape.c 9 Aug 2002 22:28:45 -0000 @@ -740,8 +740,11 @@ * Need our own seek pointer. */ (void) close(diskfd); - if ((diskfd = open(disk, O_RDONLY)) < 0) + while ((diskfd = open(disk, O_RDONLY)) < 0) { + if (errno == EINTR) + continue; quit("slave couldn't reopen disk: %s\n", strerror(errno)); + } /* * Need the pid of the next slave in the loop... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message