summaryrefslogtreecommitdiff
path: root/progressmeter.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-06-04 22:56:15 +1000
committerDamien Miller <djm@mindrot.org>2003-06-04 22:56:15 +1000
commit0cbb9dea050942c643f739b79d0d9f30d75da213 (patch)
tree4d563c716e9ecbf0ef3c7c3b2e872f7d87813483 /progressmeter.c
parentcc685c1cbece3cd3ece00a41c41b9781662a01aa (diff)
- (djm) Always use mysignal() for SIGALRM
Diffstat (limited to 'progressmeter.c')
-rw-r--r--progressmeter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/progressmeter.c b/progressmeter.c
index 343e1b7d5..d4abf2fd9 100644
--- a/progressmeter.c
+++ b/progressmeter.c
@@ -72,6 +72,7 @@ RCSID("$OpenBSD: progressmeter.c,v 1.6 2003/04/07 21:58:05 millert Exp $");
72 72
73#include "atomicio.h" 73#include "atomicio.h"
74#include "progressmeter.h" 74#include "progressmeter.h"
75#include "misc.h"
75 76
76/* Number of seconds before xfer considered "stalled". */ 77/* Number of seconds before xfer considered "stalled". */
77#define STALLTIME 5 78#define STALLTIME 5
@@ -121,7 +122,7 @@ start_progress_meter(char *file, off_t filesize, off_t *counter)
121 lastsize = 0; 122 lastsize = 0;
122 123
123 draw_progress_meter(); 124 draw_progress_meter();
124 signal(SIGALRM, update_progress_meter); 125 mysignal(SIGALRM, update_progress_meter);
125 alarm(PROGRESSTIME); 126 alarm(PROGRESSTIME);
126} 127}
127 128
@@ -140,7 +141,7 @@ update_progress_meter(int ignore)
140 int save_errno = errno; 141 int save_errno = errno;
141 142
142 draw_progress_meter(); 143 draw_progress_meter();
143 signal(SIGALRM, update_progress_meter); 144 mysignal(SIGALRM, update_progress_meter);
144 alarm(PROGRESSTIME); 145 alarm(PROGRESSTIME);
145 errno = save_errno; 146 errno = save_errno;
146} 147}