diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-03-29 09:26:02 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-03-29 09:26:02 +0000 |
commit | b95360d5bc9e5463157d91656aaac22180c24f1a (patch) | |
tree | 8264d934bb0fecf048f0984720edfda69f3f59cd /package/uhttpd/src/uhttpd-cgi.c | |
parent | 9701e09587723ef3648cd730850198ca20942911 (diff) | |
download | upstream-b95360d5bc9e5463157d91656aaac22180c24f1a.tar.gz upstream-b95360d5bc9e5463157d91656aaac22180c24f1a.tar.bz2 upstream-b95360d5bc9e5463157d91656aaac22180c24f1a.zip |
uhttpd: fix a signal related race condition exposed by LuCI on fast machines
SVN-Revision: 20573
Diffstat (limited to 'package/uhttpd/src/uhttpd-cgi.c')
-rw-r--r-- | package/uhttpd/src/uhttpd-cgi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/package/uhttpd/src/uhttpd-cgi.c b/package/uhttpd/src/uhttpd-cgi.c index 28686b47e2..1a6c6ad4fe 100644 --- a/package/uhttpd/src/uhttpd-cgi.c +++ b/package/uhttpd/src/uhttpd-cgi.c @@ -562,7 +562,10 @@ void uh_cgi_request(struct client *cl, struct http_request *req, struct path_inf close(wfd[1]); if( !kill(child, 0) ) + { kill(child, SIGTERM); + waitpid(child, NULL, 0); + } break; } |