- (stevesk) scp.c: use mysignal() for updateprogressmeter() handler.
This commit is contained in:
parent
eff26f275e
commit
93c17d9eed
|
@ -20,6 +20,7 @@
|
|||
- (djm) SCO needs librpc for libwrap. Patch from Tim Rice
|
||||
<tim@multitalents.net>
|
||||
- (stevesk) misc.c: cpp rework of SA_(INTERRUPT|RESTART) handling.
|
||||
- (stevesk) scp.c: use mysignal() for updateprogressmeter() handler.
|
||||
|
||||
20010217
|
||||
- (bal) OpenBSD Sync:
|
||||
|
@ -4027,4 +4028,4 @@
|
|||
- Wrote replacements for strlcpy and mkdtemp
|
||||
- Released 1.0pre1
|
||||
|
||||
$Id: ChangeLog,v 1.793 2001/02/18 03:42:02 stevesk Exp $
|
||||
$Id: ChangeLog,v 1.794 2001/02/18 03:55:16 stevesk Exp $
|
||||
|
|
13
scp.c
13
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);
|
||||
|
|
Loading…
Reference in New Issue