summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-14 05:53:57 +0000
committerkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-14 05:53:57 +0000
commit75c7f909b2fa6f008996fb56d1fabe6087d60b06 (patch)
treebcb2c4d80bd52e54fd68e9bd0953923ccdfe681c /third_party
parent65e3d28afd083e1ff59374d5cb09ab94aa3ce7da (diff)
downloadchromium_src-75c7f909b2fa6f008996fb56d1fabe6087d60b06.zip
chromium_src-75c7f909b2fa6f008996fb56d1fabe6087d60b06.tar.gz
chromium_src-75c7f909b2fa6f008996fb56d1fabe6087d60b06.tar.bz2
Fix proxy launcher error in chromedriver posix when chrome is closed.
The proxy launcher couldn't determine chrome's exit code because chromedriver was ignoring SIGCHLD. BUG=none TEST=none Review URL: http://codereview.chromium.org/8929013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/mongoose/README.chromium7
-rw-r--r--third_party/mongoose/chrome-mongoose-modifications.diff23
-rw-r--r--third_party/mongoose/mongoose.c2
3 files changed, 21 insertions, 11 deletions
diff --git a/third_party/mongoose/README.chromium b/third_party/mongoose/README.chromium
index 228b1c6..afadc70 100644
--- a/third_party/mongoose/README.chromium
+++ b/third_party/mongoose/README.chromium
@@ -2,7 +2,8 @@ Name: Mongoose webserver
Short Name: mongoose
URL: http://code.google.com/p/mongoose/
LICENSE: MIT
-Version: Revision 55cf8bf30cd9 (between 3.0 and 3.1)
+Version: 55cf8bf30cd9
+Release: between 3.0 and 3.1
Security Critical: no
Description:
@@ -20,4 +21,6 @@ the chrome versoin of webdriver found under the directory:
Local modifications (all detailed in chrome-mongoose-modifications.diff,
pending upstreaming by danielwh):
* Fixed a couple of Windows/VS2010 compiler warnings/errors
-* Fixed linger code to apply to sockets from bind, rather than shutdown \ No newline at end of file
+* Fixed linger code to apply to sockets from bind, rather than shutdown
+* Don't ignore SIGCHLD, since the proxy launcher depends on it for determining
+ chrome's exit code.
diff --git a/third_party/mongoose/chrome-mongoose-modifications.diff b/third_party/mongoose/chrome-mongoose-modifications.diff
index 9133758..f28be1f 100644
--- a/third_party/mongoose/chrome-mongoose-modifications.diff
+++ b/third_party/mongoose/chrome-mongoose-modifications.diff
@@ -1,6 +1,6 @@
-diff -r 55cf8bf30cd9 mongoose.c
---- a/mongoose.c Fri Aug 26 21:30:20 2011 +0100
-+++ b/mongoose.c Thu Nov 03 02:16:22 2011 +0000
+diff --git a/third_party/mongoose/mongoose.c b/third_party/mongoose/mongoose.c
+--- a/third_party/mongoose/mongoose.c
++++ b/third_party/mongoose/mongoose.c
@@ -23,7 +23,9 @@
#else
#define _XOPEN_SOURCE 600 // For flockfile() on Linux
@@ -32,7 +32,7 @@ diff -r 55cf8bf30cd9 mongoose.c
#define NO_CGI // WinCE has no pipes
typedef long off_t;
-@@ -849,7 +854,9 @@
+@@ -849,7 +854,9 @@ static int pthread_cond_init(pthread_cond_t *cv, const void *unused) {
}
static int pthread_cond_wait(pthread_cond_t *cv, pthread_mutex_t *mutex) {
@@ -43,7 +43,7 @@ diff -r 55cf8bf30cd9 mongoose.c
ReleaseMutex(*mutex);
WaitForMultipleObjects(2, handles, FALSE, INFINITE);
return WaitForSingleObject(*mutex, INFINITE) == WAIT_OBJECT_0? 0 : -1;
-@@ -3424,6 +3431,10 @@
+@@ -3424,6 +3431,10 @@ static int set_ports_option(struct mg_context *ctx) {
struct vec vec;
struct socket so, *listener;
@@ -54,7 +54,7 @@ diff -r 55cf8bf30cd9 mongoose.c
while (success && (list = next_option(list, &vec, NULL)) != NULL) {
if (!parse_port_string(&vec, &so)) {
cry(fc(ctx), "%s: %.*s: invalid port spec. Expecting list of: %s",
-@@ -3448,6 +3459,8 @@
+@@ -3448,6 +3459,8 @@ static int set_ports_option(struct mg_context *ctx) {
// Thanks to Igor Klopov who suggested the patch.
setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *) &on,
sizeof(on)) != 0 ||
@@ -63,7 +63,7 @@ diff -r 55cf8bf30cd9 mongoose.c
bind(sock, &so.lsa.u.sa, so.lsa.len) != 0 ||
listen(sock, 100) != 0) {
closesocket(sock);
-@@ -3768,15 +3781,8 @@
+@@ -3768,15 +3781,8 @@ static void reset_per_request_attributes(struct mg_connection *conn) {
static void close_socket_gracefully(SOCKET sock) {
char buf[BUFSIZ];
@@ -79,3 +79,12 @@ diff -r 55cf8bf30cd9 mongoose.c
// Send FIN to the client
(void) shutdown(sock, SHUT_WR);
set_non_blocking_mode(sock);
+@@ -4233,8 +4239,6 @@ struct mg_context *mg_start(mg_callback_t user_callback, void *user_data,
+ // Ignore SIGPIPE signal, so if browser cancels the request, it
+ // won't kill the whole process.
+ (void) signal(SIGPIPE, SIG_IGN);
+- // Also ignoring SIGCHLD to let the OS to reap zombies properly.
+- (void) signal(SIGCHLD, SIG_IGN);
+ #endif // !_WIN32
+
+ (void) pthread_mutex_init(&ctx->mutex, NULL);
diff --git a/third_party/mongoose/mongoose.c b/third_party/mongoose/mongoose.c
index 299ca42..9c9f554 100644
--- a/third_party/mongoose/mongoose.c
+++ b/third_party/mongoose/mongoose.c
@@ -4239,8 +4239,6 @@ struct mg_context *mg_start(mg_callback_t user_callback, void *user_data,
// Ignore SIGPIPE signal, so if browser cancels the request, it
// won't kill the whole process.
(void) signal(SIGPIPE, SIG_IGN);
- // Also ignoring SIGCHLD to let the OS to reap zombies properly.
- (void) signal(SIGCHLD, SIG_IGN);
#endif // !_WIN32
(void) pthread_mutex_init(&ctx->mutex, NULL);