aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/signalpipe.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-03-26 10:09:34 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-03-26 10:09:34 +0100
commit385b4562e39e373761fd62b0990dce02ff96661f (patch)
tree5446c10cd8fbde102f59705a9c0419227707c520 /networking/udhcp/signalpipe.c
parent968951fd0ced7d0d4b81c0ee4466eada93ae4128 (diff)
downloadbusybox-385b4562e39e373761fd62b0990dce02ff96661f.tar.gz
udhcp: cosmetic cleanups; one case of s/full_read/xread/
function old new delta dumpleases_main 632 623 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/signalpipe.c')
-rw-r--r--networking/udhcp/signalpipe.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/networking/udhcp/signalpipe.c b/networking/udhcp/signalpipe.c
index c181e0e06..6355c5e90 100644
--- a/networking/udhcp/signalpipe.c
+++ b/networking/udhcp/signalpipe.c
@@ -1,6 +1,5 @@
/* vi: set sw=4 ts=4: */
-/* signalpipe.c
- *
+/*
* Signal pipe infrastructure. A reliable way of delivering signals.
*
* Russ Dill <Russ.Dill@asu.edu> December 2003
@@ -19,10 +18,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
#include "common.h"
-
+/* Global variable: we access it from signal handler */
static struct fd_pair signal_pipe;
static void signal_handler(int sig)
@@ -32,7 +30,6 @@ static void signal_handler(int sig)
bb_perror_msg("can't send signal");
}
-
/* Call this before doing anything else. Sets up the socket pair
* and installs the signal handler */
void FAST_FUNC udhcp_sp_setup(void)
@@ -49,7 +46,6 @@ void FAST_FUNC udhcp_sp_setup(void)
, signal_handler);
}
-
/* Quick little function to setup the rfds. Will return the
* max_fd for use with select. Limited in that you can only pass
* one extra fd */
@@ -64,7 +60,6 @@ int FAST_FUNC udhcp_sp_fd_set(fd_set *rfds, int extra_fd)
return signal_pipe.rd > extra_fd ? signal_pipe.rd : extra_fd;
}
-
/* Read a signal from the signal pipe. Returns 0 if there is
* no signal, -1 on error (and sets errno appropriately), and
* your signal on success */