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:
parent
1fafe1d5e9
commit
69b443d18c
@ -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.
|
* Copyright (c) 1997-2007 The NetBSD Foundation, Inc.
|
||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#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 */
|
#endif /* not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -180,8 +180,8 @@ progressmeter(int flag)
|
|||||||
"transfer aborted because stalled for %lu sec.\r\n",
|
"transfer aborted because stalled for %lu sec.\r\n",
|
||||||
getprogname(), (unsigned long)wait.tv_sec);
|
getprogname(), (unsigned long)wait.tv_sec);
|
||||||
(void)write(fileno(ttyout), buf, len);
|
(void)write(fileno(ttyout), buf, len);
|
||||||
(void)xsignal(SIGALRM, SIG_DFL);
|
|
||||||
alarmtimer(0);
|
alarmtimer(0);
|
||||||
|
(void)xsignal(SIGALRM, SIG_DFL);
|
||||||
siglongjmp(toplevel, 1);
|
siglongjmp(toplevel, 1);
|
||||||
}
|
}
|
||||||
#endif /* !STANDALONE_PROGRESS */
|
#endif /* !STANDALONE_PROGRESS */
|
||||||
@ -198,8 +198,8 @@ progressmeter(int flag)
|
|||||||
(void)xsignal_restart(SIGALRM, updateprogressmeter, 1);
|
(void)xsignal_restart(SIGALRM, updateprogressmeter, 1);
|
||||||
alarmtimer(1); /* set alarm timer for 1 Hz */
|
alarmtimer(1); /* set alarm timer for 1 Hz */
|
||||||
} else if (flag == 1) {
|
} else if (flag == 1) {
|
||||||
(void)xsignal(SIGALRM, SIG_DFL);
|
|
||||||
alarmtimer(0);
|
alarmtimer(0);
|
||||||
|
(void)xsignal(SIGALRM, SIG_DFL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef NO_PROGRESS
|
#ifndef NO_PROGRESS
|
||||||
|
@ -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.
|
* Copyright (c) 1999-2007 The NetBSD Foundation, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -40,5 +40,5 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FTP_VERSION
|
#ifndef FTP_VERSION
|
||||||
#define FTP_VERSION "20071205"
|
#define FTP_VERSION "20080121"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user