Date: Sat, 10 Aug 2002 00:07:28 +0100 From: Ian Dowse <iedowse@maths.tcd.ie> To: Alexander Leidinger <Alexander@Leidinger.net> Cc: bhlewis@wossname.net, freebsd-current@FreeBSD.ORG Subject: Re: Is anyone else having trouble with dump(8) on -current? Message-ID: <200208100007.aa02493@salmon.maths.tcd.ie> In-Reply-To: Your message of "Tue, 14 May 2002 12:34:12 %2B0200." <200205141034.g4EAYCJr024857@Magelan.Leidinger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
[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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <200208100007.aa02493>