diff options
Diffstat (limited to 'scp.c')
-rw-r--r-- | scp.c | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -81,6 +81,7 @@ RCSID("$OpenBSD: scp.c,v 1.58 2001/02/10 15:14:11 danh Exp $"); | |||
81 | #include "atomicio.h" | 81 | #include "atomicio.h" |
82 | #include "pathnames.h" | 82 | #include "pathnames.h" |
83 | #include "log.h" | 83 | #include "log.h" |
84 | #include "misc.h" | ||
84 | 85 | ||
85 | #ifdef HAVE___PROGNAME | 86 | #ifdef HAVE___PROGNAME |
86 | extern char *__progname; | 87 | extern char *__progname; |
@@ -1221,17 +1222,7 @@ progressmeter(int flag) | |||
1221 | atomicio(write, fileno(stdout), buf, strlen(buf)); | 1222 | atomicio(write, fileno(stdout), buf, strlen(buf)); |
1222 | 1223 | ||
1223 | if (flag == -1) { | 1224 | if (flag == -1) { |
1224 | struct sigaction sa; | 1225 | mysignal(SIGALRM, updateprogressmeter); |
1225 | sa.sa_handler = updateprogressmeter; | ||
1226 | sigemptyset((sigset_t *)&sa.sa_mask); | ||
1227 | sa.sa_flags = 0; | ||
1228 | #ifdef SA_RESTART | ||
1229 | sa.sa_flags |= SA_RESTART; | ||
1230 | #endif | ||
1231 | #ifdef SA_INTERRUPT | ||
1232 | sa.sa_flags |= SA_INTERRUPT; | ||
1233 | #endif | ||
1234 | sigaction(SIGALRM, &sa, NULL); | ||
1235 | alarmtimer(1); | 1226 | alarmtimer(1); |
1236 | } else if (flag == 1) { | 1227 | } else if (flag == 1) { |
1237 | alarmtimer(0); | 1228 | alarmtimer(0); |