diff options
author | Mark H Weaver <mhw@netris.org> | 2019-05-25 05:20:42 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2019-06-18 02:05:20 -0400 |
commit | 03de93dd5fb895338551ee91f60ce6d4258e9318 (patch) | |
tree | 5ac3a06f9f0162b575857fac736ba9c5fc0aba10 /libguile | |
parent | 91ba73b397fcc2a36ae7e434522a924c7a8887d0 (diff) |
Save and restore errno in the signal handler.
* libguile/scmsigs.c (take_signal): Save and restore errno.
Diffstat (limited to 'libguile')
-rw-r--r-- | libguile/scmsigs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c index 755e657ea..a870f5687 100644 --- a/libguile/scmsigs.c +++ b/libguile/scmsigs.c @@ -129,12 +129,14 @@ static int signal_pipe[2]; static SIGRETTYPE take_signal (int signum) { + int old_errno = errno; char sigbyte = signum; full_write (signal_pipe[1], &sigbyte, 1); #ifndef HAVE_SIGACTION signal (signum, take_signal); #endif + errno = old_errno; } struct signal_pipe_data |