From owner-cvs-all Sun Oct 27 7:16:14 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 73CAB37B401; Sun, 27 Oct 2002 07:16:13 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B61543E6A; Sun, 27 Oct 2002 07:16:13 -0800 (PST) (envelope-from des@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id g9RFFDmV007492; Sun, 27 Oct 2002 07:15:13 -0800 (PST) (envelope-from des@repoman.freebsd.org) Received: (from des@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id g9RFFDJ0007491; Sun, 27 Oct 2002 07:15:13 -0800 (PST) Message-Id: <200210271515.g9RFFDJ0007491@repoman.freebsd.org> From: Dag-Erling Smorgrav Date: Sun, 27 Oct 2002 07:15:13 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/fetch fetch.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG des 2002/10/27 07:15:13 PST Modified files: usr.bin/fetch fetch.c Log: Add an ETA timer that kicks in after 30 seconds. Re-add alarm(2) calls around the calls to fetchStat(3) and fetchXGet(3), since these calls can still time out on DNS lookups or TCP connect(2). Remove the alarm(2) calls in the main loop, since all methods properly handle transfer timeouts (as opposed to connection timeouts). Set the sigalrm flag if a timeout occurs in the main loop. Move the signal: label up a little so we still set the atime and mtime when the transfer times out or is interrupted, so that restarted transfers will work as expected (as long as the file still exists). MFC after: 2 weeks Revision Changes Path 1.51 +45 -16 src/usr.bin/fetch/fetch.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message