diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-06-03 23:34:57 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-06-03 23:34:57 +0000 |
commit | aecbbe45ed8444f78d6c0258dea53481e61e06f2 (patch) | |
tree | b4db4b87f4096fd740cd9f7982636acdaf8588e9 /lib | |
parent | f89fd827f75c9131e701cdb42db7a1dbc032b8b0 (diff) |
lots of back things happening in this signal handler, but at least
start to clean up the simple stuff
ok nicm
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libedit/sig.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libedit/sig.c b/lib/libedit/sig.c index 7e22486738b..b36e0725d10 100644 --- a/lib/libedit/sig.c +++ b/lib/libedit/sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sig.c,v 1.12 2010/06/30 00:05:35 nicm Exp $ */ +/* $OpenBSD: sig.c,v 1.13 2011/06/03 23:34:56 deraadt Exp $ */ /* $NetBSD: sig.c,v 1.15 2009/02/19 15:20:22 christos Exp $ */ /*- @@ -62,7 +62,7 @@ private void sig_handler(int); private void sig_handler(int signo) { - int i; + int i, save_errno = errno; sigset_t nset, oset; (void) sigemptyset(&nset); @@ -98,6 +98,7 @@ sig_handler(int signo) sigemptyset(&sel->el_signal->sig_action[i].sa_mask); (void) sigprocmask(SIG_SETMASK, &oset, NULL); (void) kill(0, signo); + errno = save_errno; } |