#include <stdio.h>#include <unistd.h>#include <stdlib.h>#include <fcntl.h>#include <stdarg.h>#include <errno.h>#include "winsup.h"#include "dll_init.h"Go to the source code of this file.
Defines | |
| #define | FORK_WAIT_TIMEOUT (300 * 1000) |
| #define | dll_data_start &_data_start__ |
| #define | dll_data_end &_data_end__ |
| #define | dll_bss_start &_bss_start__ |
| #define | dll_bss_end &_bss_end__ |
| #define | sync_with_parent(s, hang_self) |
Functions | |
| static void | stack_base (child_info_fork &ch) |
| static int | fork_copy (PROCESS_INFORMATION &pi, const char *what,...) |
| static int | sync_with_child (PROCESS_INFORMATION &pi, HANDLE subproc_ready, BOOL hang_child, const char *s) |
| static int | resume_child (PROCESS_INFORMATION &pi, HANDLE forker_finished) |
| static volatile void | grow_stack_slack () |
| static void * | stack_dummy (int here) |
| int | fork () |
| int | vfork () |
Variables | |
| DWORD NO_COPY | chunksize = 0 |
|
|
Definition at line 28 of file fork.c. Referenced by fork(). |
|
|
Definition at line 27 of file fork.c. Referenced by fork(). |
|
|
Definition at line 26 of file fork.c. Referenced by fork(). |
|
|
Definition at line 25 of file fork.c. Referenced by fork(). |
|
|
Definition at line 23 of file fork.c. Referenced by sync_with_child(). |
|
|
Value: ((void) ({ \
debug_printf ("signalling parent: %s", s); \
/* Tell our parent we're waiting. */ \
if (!SetEvent (child_proc_info->subproc_ready)) \
api_fatal ("fork child - SetEvent failed, %E"); \
if (hang_self) \
{ \
/* Wait for the parent to fill in our stack and heap. \
Don't wait forever here. If our parent dies we don't want to clog \
the system. If the wait fails, we really can't continue so exit. */ \
DWORD psync_rc = WaitForSingleObject (child_proc_info->forker_finished, FORK_WAIT_TIMEOUT); \
switch (psync_rc) \
{ \
case WAIT_TIMEOUT: \
api_fatal ("sync_with_parent - WFSO timed out"); \
break; \
case WAIT_FAILED: \
if (GetLastError () == ERROR_INVALID_HANDLE && \
WaitForSingleObject (child_proc_info->forker_finished, 1) != WAIT_FAILED) \
break; \
api_fatal ("sync_with_parent - WFSO failed, fork_finished %p, %E", child_proc_info->forker_finished); \
break; \
default: \
break; \
} \
debug_printf ("awake"); \
} \
0; \
}))
|
|
|
||||||||||||||||
|
Definition at line 61 of file fork.c. References chunksize, and res. Referenced by fork(). |
|
|
Definition at line 620 of file fork.c. References dummy(). Referenced by fork(). |
|
||||||||||||
|
Definition at line 172 of file fork.c. References rc. Referenced by fork(). |
|
|
Definition at line 42 of file fork.c. Referenced by fork(). |
|
|
Definition at line 231 of file fork.c. Referenced by fork(). |
|
||||||||||||||||||||
|
Definition at line 112 of file fork.c. References FORK_WAIT_TIMEOUT, and rc. Referenced by fork(). |
|
|
|
|
|
Definition at line 20 of file fork.c. Referenced by fork_copy(). |
1.4.6-NO