summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
authorKevin Steves <stevesk@pobox.com>2001-02-18 03:55:16 +0000
committerKevin Steves <stevesk@pobox.com>2001-02-18 03:55:16 +0000
commit93c17d9eed2643e1f5ab4d2a5de46e5c7fd0fb93 (patch)
tree750822bf1509b0e3bf913db35a2689ac5e73c425 /scp.c
parenteff26f275eca8fb4c1dab03599ad21d79a8a55ea (diff)
- (stevesk) scp.c: use mysignal() for updateprogressmeter() handler.
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/scp.c b/scp.c
index 834deb69..3ca110b1 100644
--- a/scp.c
+++ b/scp.c
@@ -81,6 +81,7 @@ RCSID("$OpenBSD: scp.c,v 1.58 2001/02/10 15:14:11 danh Exp $");
#include "atomicio.h"
#include "pathnames.h"
#include "log.h"
+#include "misc.h"
#ifdef HAVE___PROGNAME
extern char *__progname;
@@ -1221,17 +1222,7 @@ progressmeter(int flag)
atomicio(write, fileno(stdout), buf, strlen(buf));
if (flag == -1) {
- struct sigaction sa;
- sa.sa_handler = updateprogressmeter;
- sigemptyset((sigset_t *)&sa.sa_mask);
- sa.sa_flags = 0;
-#ifdef SA_RESTART
- sa.sa_flags |= SA_RESTART;
-#endif
-#ifdef SA_INTERRUPT
- sa.sa_flags |= SA_INTERRUPT;
-#endif
- sigaction(SIGALRM, &sa, NULL);
+ mysignal(SIGALRM, updateprogressmeter);
alarmtimer(1);
} else if (flag == 1) {
alarmtimer(0);