HANDLE os_start;
HANDLE hScore;
+ if ((rv = apr_file_write_full(child_in, &my_generation,
+ sizeof(my_generation), NULL))
+ != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(02964)
+ "Parent: Unable to send its generation to the child");
+ return -1;
+ }
if (!DuplicateHandle(hCurrentProcess, child_ready_event, hProcess, &hDup,
EVENT_MODIFY_STATE | SYNCHRONIZE, FALSE, 0)) {
ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00392)
{
HANDLE filehand;
HANDLE hproc = GetCurrentProcess();
+ DWORD BytesRead;
/* This is the child */
my_pid = GetCurrentProcessId();
* already
*/
+ /* Read this child's generation number as soon as now,
+ * so that further hooks can query it.
+ */
+ if (!ReadFile(pipe, &my_generation, sizeof(my_generation),
+ &BytesRead, (LPOVERLAPPED) NULL)
+ || (BytesRead != sizeof(my_generation))) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), NULL, APLOGNO(02965)
+ "Child: Unable to retrieve my generation from the parent");
+ exit(APEXIT_CHILDINIT);
+ }
/* The parent is responsible for providing the
* COMPLETE ARGUMENTS REQUIRED to the child.
/* Done reading from the parent, close that channel */
CloseHandle(pipe);
-
- my_generation = ap_scoreboard_image->global->running_generation;
}
else {
/* Single process mode - this lock doesn't even need to exist */