Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

Commit

Permalink
2005-03-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Browse files Browse the repository at this point in the history
	* src/mod_mono.c: try to connect to mod-mono-server before forking.
	Patch by Rob Lyon.


svn path=/trunk/mod_mono/; revision=41476
  • Loading branch information
gonzalop committed Mar 5, 2005
1 parent ffcc6a5 commit b1574b7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2005-03-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* src/mod_mono.c: try to connect to mod-mono-server before forking.
Patch by Rob Lyon.

2005-03-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* configure.in: 1.0.6.99.
Expand Down
22 changes: 18 additions & 4 deletions src/mod_mono.c
Expand Up @@ -1288,6 +1288,8 @@ mono_child_init (
int i;
module_cfg *config;
xsp_data *xsp;
apr_socket_t *sock;
apr_status_t rv;

DEBUG_PRINT (0, "Mono Child Init");
config = ap_get_module_config (s->module_config, &mono_module);
Expand All @@ -1303,10 +1305,22 @@ mono_child_init (
if (xsp->status != FORK_NONE)
continue;

xsp->status = FORK_INPROCESS;
DEBUG_PRINT (0, "Forking %s", xsp->alias);
fork_mod_mono_server (pconf, xsp);
xsp->status = FORK_SUCCEEDED;
#ifdef APACHE13
sock = apr_pcalloc (pconf, sizeof (apr_socket_t));
#endif
rv = setup_socket (&sock, xsp, pconf, TRUE);

if (rv == APR_SUCCESS) {
/* connected */
DEBUG_PRINT (0, "connected %s", xsp->alias);
apr_socket_close (sock);
} else {
/* need fork */
xsp->status = FORK_INPROCESS;
DEBUG_PRINT (0, "forking %s", xsp->alias);
fork_mod_mono_server (pconf, xsp);
xsp->status = FORK_SUCCEEDED;
}
}
}

Expand Down

0 comments on commit b1574b7

Please sign in to comment.