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
diff --git a/progressmeter.c b/progressmeter.c
index 72f40f8..8baf798 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 @@
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);
}