From owner-freebsd-current Sun Aug 11 5:33:37 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 A43E637B400 for ; Sun, 11 Aug 2002 05:33:33 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 68FA243E65 for ; Sun, 11 Aug 2002 05:33:32 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 11 Aug 2002 13:33:31 +0100 (BST) To: Bruce Evans Cc: Alexander Leidinger , 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 "Sun, 11 Aug 2002 02:03:40 +1000." <20020811014214.D17412-100000@gamplex.bde.org> Date: Sun, 11 Aug 2002 13:33:30 +0100 From: Ian Dowse Message-ID: <200208111333.aa34638@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 In message <20020811014214.D17412-100000@gamplex.bde.org>, Bruce Evans writes: > >I don't know how open() of a disk device can be interrupted by a signal >in practice. Most disk operations don't check for signals. Does the PCATCH tsleep in diskopen() that I mentioned seem a likely candidate? Anyway, below is a simple program that reproduces the EINTR error fairly reliably for me when run on disk devices. Ian #include #include #include #include #include void handler(int sig) { } int main(int argc, char **argv) { int fd, i; if (argc < 2) errx(1, "Usage: %s device", argv[0]); fork(); fork(); fork(); fork(); signal(SIGUSR1, handler); sleep(1); for (i = 0; i < 200; i++) { killpg(0, SIGUSR1); if ((fd = open(argv[1], O_RDONLY)) < 0) err(1, "%s", argv[1]); close(fd); } return 0; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message