Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-06-16 01:59:32 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-16 01:59:32 +0400
commit6ea3e429df9c98b850e3a4bf906da06f1c447bd9 (patch)
tree44e991f12dde60a88b0e2223dc9ba18bc22abe61 /winsup/cygwin/fork.cc
parent5ae611458b5e107705f414c782afc53ce0bd4b59 (diff)
* child_info.h (child_proc_info): Declare as base class.
(spawn_info): Declare as alias of child_proc_info to aid debugging. (fork_info): Ditto. * cygheap.cc (cygheap_fixup_in_child): Use child_proc_info global rather than parameter. * cygheap.h (cygheap_fixup_in_child): Reflect above change in declaration. * dcrt0.cc (_dll_crt0): Move 'si' definition here. Assign child_proc_info. (dll_crt0_1): Accommodate cygheap_fixup_in_child and *_info changes. * environ.cc (spenv::retrieve): Make regparm. * environ.h (environ_init): Ditto. (win_env::add_cache): Ditto. (build_env): Ditto. (getwinenv): Ditto. * fork.cc (sync_with_parent): Use fork_info global. (fork_child): Ditto.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index ff464f038..7a7cac0ba 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -196,11 +196,11 @@ sync_with_parent(const char *s, bool hang_self)
{
debug_printf ("signalling parent: %s", s);
/* Tell our parent we're waiting. */
- if (!SetEvent (child_proc_info->subproc_ready))
+ if (!SetEvent (fork_info->subproc_ready))
api_fatal ("fork child - SetEvent for %s failed, %E", s);
if (hang_self)
{
- HANDLE h = child_proc_info->forker_finished;
+ HANDLE h = fork_info->forker_finished;
/* 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. */
@@ -213,10 +213,10 @@ sync_with_parent(const char *s, bool hang_self)
break;
case WAIT_FAILED:
if (GetLastError () == ERROR_INVALID_HANDLE &&
- WaitForSingleObject (child_proc_info->forker_finished, 1) != WAIT_FAILED)
+ WaitForSingleObject (fork_info->forker_finished, 1) != WAIT_FAILED)
break;
api_fatal ("WFSO failed for %s, fork_finished %p, %E", s,
- child_proc_info->forker_finished);
+ fork_info->forker_finished);
break;
default:
debug_printf ("no problems");
@@ -265,10 +265,10 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
fork() was invoked from other than the main thread. Make sure that
when the "main" thread exits it calls do_exit, like a normal process.
Exit with a status code of 0. */
- if (child_proc_info->stacksize)
+ if (fork_info->stacksize)
{
- ((DWORD *)child_proc_info->stackbottom)[-17] = (DWORD)do_exit;
- ((DWORD *)child_proc_info->stackbottom)[-15] = (DWORD)0;
+ ((DWORD *)fork_info->stackbottom)[-17] = (DWORD)do_exit;
+ ((DWORD *)fork_info->stackbottom)[-15] = (DWORD)0;
}
set_file_api_mode (current_codepage);
@@ -298,8 +298,8 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
}
ForceCloseHandle (hParent);
- (void) ForceCloseHandle (child_proc_info->subproc_ready);
- (void) ForceCloseHandle (child_proc_info->forker_finished);
+ (void) ForceCloseHandle (fork_info->subproc_ready);
+ (void) ForceCloseHandle (fork_info->forker_finished);
if (fixup_shms_after_fork ())
api_fatal ("recreate_shm areas after fork failed");