diff options
author | Kevin Steves <stevesk@pobox.com> | 2001-02-18 03:55:16 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@pobox.com> | 2001-02-18 03:55:16 +0000 |
commit | 93c17d9eed2643e1f5ab4d2a5de46e5c7fd0fb93 (patch) | |
tree | 750822bf1509b0e3bf913db35a2689ac5e73c425 | |
parent | eff26f275eca8fb4c1dab03599ad21d79a8a55ea (diff) |
- (stevesk) scp.c: use mysignal() for updateprogressmeter() handler.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | scp.c | 13 |
2 files changed, 4 insertions, 12 deletions
@@ -20,6 +20,7 @@ | |||
20 | - (djm) SCO needs librpc for libwrap. Patch from Tim Rice | 20 | - (djm) SCO needs librpc for libwrap. Patch from Tim Rice |
21 | <tim@multitalents.net> | 21 | <tim@multitalents.net> |
22 | - (stevesk) misc.c: cpp rework of SA_(INTERRUPT|RESTART) handling. | 22 | - (stevesk) misc.c: cpp rework of SA_(INTERRUPT|RESTART) handling. |
23 | - (stevesk) scp.c: use mysignal() for updateprogressmeter() handler. | ||
23 | 24 | ||
24 | 20010217 | 25 | 20010217 |
25 | - (bal) OpenBSD Sync: | 26 | - (bal) OpenBSD Sync: |
@@ -4027,4 +4028,4 @@ | |||
4027 | - Wrote replacements for strlcpy and mkdtemp | 4028 | - Wrote replacements for strlcpy and mkdtemp |
4028 | - Released 1.0pre1 | 4029 | - Released 1.0pre1 |
4029 | 4030 | ||
4030 | $Id: ChangeLog,v 1.793 2001/02/18 03:42:02 stevesk Exp $ | 4031 | $Id: ChangeLog,v 1.794 2001/02/18 03:55:16 stevesk Exp $ |
@@ -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); |