projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b3b468
)
udhcp: do not clobber errno by signal handler
author
Denys Vlasenko
<vda.linux@googlemail.com>
Thu, 16 Feb 2017 19:04:19 +0000
(20:04 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Thu, 16 Feb 2017 19:04:19 +0000
(20:04 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/udhcp/signalpipe.c
patch
|
blob
|
history
diff --git
a/networking/udhcp/signalpipe.c
b/networking/udhcp/signalpipe.c
index 6355c5e90208b5c5f7b70ba74d20bcfd1b510dd5..30bccd6bf9cb3aedf1f07970119c85e7b18b2a80 100644
(file)
--- a/
networking/udhcp/signalpipe.c
+++ b/
networking/udhcp/signalpipe.c
@@
-25,9
+25,11
@@
static struct fd_pair signal_pipe;
static void signal_handler(int sig)
{
+ int sv = errno;
unsigned char ch = sig; /* use char, avoid dealing with partial writes */
if (write(signal_pipe.wr, &ch, 1) != 1)
bb_perror_msg("can't send signal");
+ errno = sv;
}
/* Call this before doing anything else. Sets up the socket pair