summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
41064d1)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@27629
3c298f89-4303-0410-b956-
a3cf2f4a3e73
-# Copyright (C) 2010 Jo-Philipp Wich <xm@subsignal.org>
+# Copyright (C) 2010-2011 Jo-Philipp Wich <xm@subsignal.org>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=uhttpd
include $(TOPDIR)/rules.mk
PKG_NAME:=uhttpd
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_BUILD_DEPENDS := libcyassl liblua
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_BUILD_DEPENDS := libcyassl liblua
fd_set reader;
fd_set writer;
fd_set reader;
fd_set writer;
struct sigaction sa;
struct timeval timeout;
struct http_response *res;
struct sigaction sa;
struct timeval timeout;
struct http_response *res;
+ /* unblock signals */
+ sigemptyset(&ss);
+ sigprocmask(SIG_SETMASK, &ss, NULL);
+
/* restore SIGTERM */
sa.sa_flags = 0;
sa.sa_handler = SIG_DFL;
/* restore SIGTERM */
sa.sa_flags = 0;
sa.sa_handler = SIG_DFL;
dup2(rfd[1], 1);
dup2(wfd[0], 0);
dup2(rfd[1], 1);
dup2(wfd[0], 0);
+ /* avoid leaking our pipe into child-child processes */
+ fd_cloexec(rfd[1]);
+ fd_cloexec(wfd[0]);
+
/* check for regular, world-executable file _or_ interpreter */
if( ((pi->stat.st_mode & S_IFREG) &&
(pi->stat.st_mode & S_IXOTH)) || (ip != NULL)
/* check for regular, world-executable file _or_ interpreter */
if( ((pi->stat.st_mode & S_IFREG) &&
(pi->stat.st_mode & S_IXOTH)) || (ip != NULL)
-static inline uh_inittls(struct config *conf)
+static inline int uh_inittls(struct config *conf)
{
/* library handle */
void *lib;
{
/* library handle */
void *lib;