summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2020-01-23 07:10:22 +0000
committerDarren Tucker <dtucker@dtucker.net>2020-01-23 18:51:25 +1100
commit3bf2a6ac791d64046a537335a0f1d5e43579c5ad (patch)
tree76fcc0f1be306541c074be4aed3aca66023f0962 /misc.h
parente027c044c796f3a01081a91bee55741204283f28 (diff)
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 'misc.h')
-rw-r--r--misc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/misc.h b/misc.h
index 7421fbdf9..2221a54c8 100644
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.h,v 1.82 2019/11/12 22:34:20 djm Exp $ */ 1/* $OpenBSD: misc.h,v 1.83 2020/01/23 07:10:22 dtucker Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -190,4 +190,6 @@ void notify_complete(struct notifier_ctx *);
190#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) 190#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b))
191#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) 191#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y))
192 192
193typedef void (*sshsig_t)(int);
194sshsig_t ssh_signal(int, sshsig_t);
193#endif /* _MISC_H */ 195#endif /* _MISC_H */