Turn off the alarmtimer before resetting the SIGALRM handler back to SIG_DFL.

Fix from dieter roelants <dieter.NetBSD@pandora.be>
Should fix PR 35630.
This commit is contained in:
lukem 2008-01-21 10:31:28 +00:00
parent 1fafe1d5e9
commit 69b443d18c
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: progressbar.c,v 1.17 2007/05/05 18:09:24 martin Exp $ */
/* $NetBSD: progressbar.c,v 1.18 2008/01/21 10:31:28 lukem Exp $ */
/*-
* Copyright (c) 1997-2007 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: progressbar.c,v 1.17 2007/05/05 18:09:24 martin Exp $");
__RCSID("$NetBSD: progressbar.c,v 1.18 2008/01/21 10:31:28 lukem Exp $");
#endif /* not lint */
/*
@ -180,8 +180,8 @@ progressmeter(int flag)
"transfer aborted because stalled for %lu sec.\r\n",
getprogname(), (unsigned long)wait.tv_sec);
(void)write(fileno(ttyout), buf, len);
(void)xsignal(SIGALRM, SIG_DFL);
alarmtimer(0);
(void)xsignal(SIGALRM, SIG_DFL);
siglongjmp(toplevel, 1);
}
#endif /* !STANDALONE_PROGRESS */
@ -198,8 +198,8 @@ progressmeter(int flag)
(void)xsignal_restart(SIGALRM, updateprogressmeter, 1);
alarmtimer(1); /* set alarm timer for 1 Hz */
} else if (flag == 1) {
(void)xsignal(SIGALRM, SIG_DFL);
alarmtimer(0);
(void)xsignal(SIGALRM, SIG_DFL);
}
}
#ifndef NO_PROGRESS

View File

@ -1,4 +1,4 @@
/* $NetBSD: version.h,v 1.71 2007/12/05 00:15:25 lukem Exp $ */
/* $NetBSD: version.h,v 1.72 2008/01/21 10:31:28 lukem Exp $ */
/*-
* Copyright (c) 1999-2007 The NetBSD Foundation, Inc.
* All rights reserved.
@ -40,5 +40,5 @@
#endif
#ifndef FTP_VERSION
#define FTP_VERSION "20071205"
#define FTP_VERSION "20080121"
#endif