diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2020-01-23 08:10:22 +0100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2020-01-23 08:51:25 +0100 |
commit | 3bf2a6ac791d64046a537335a0f1d5e43579c5ad (patch) | |
tree | 76fcc0f1be306541c074be4aed3aca66023f0962 /progressmeter.c | |
parent | upstream: missing header change from previous; spotted by dtucker@ (diff) | |
download | openssh-3bf2a6ac791d64046a537335a0f1d5e43579c5ad.tar.xz openssh-3bf2a6ac791d64046a537335a0f1d5e43579c5ad.zip |
upstream: Replace all calls to signal(2) with a wrapper around
sigaction(2). This wrapper blocks all other signals during the handler
preventing races between handlers, and sets SA_RESTART which should reduce
the potential for short read/write operations.
OpenBSD-Commit-ID: 5e047663fd77a40d7b07bdabe68529df51fd2519
Diffstat (limited to 'progressmeter.c')
-rw-r--r-- | progressmeter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/progressmeter.c b/progressmeter.c index 72f40f8f9..8baf798f1 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: progressmeter.c,v 1.49 2019/10/29 07:47:27 dtucker Exp $ */ +/* $OpenBSD: progressmeter.c,v 1.50 2020/01/23 07:10:22 dtucker Exp $ */ /* * Copyright (c) 2003 Nils Nordman. All rights reserved. * @@ -252,8 +252,8 @@ start_progress_meter(const char *f, off_t filesize, off_t *ctr) setscreensize(); refresh_progress_meter(1); - signal(SIGALRM, sig_alarm); - signal(SIGWINCH, sig_winch); + ssh_signal(SIGALRM, sig_alarm); + ssh_signal(SIGWINCH, sig_winch); alarm(UPDATE_INTERVAL); } |