From aaf219f01e5cd7fac54fafae24974e06a737b9ee Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 26 Dec 2001 21:35:16 +0000 Subject: * cygmagic: Add define name to warning. * dcrt0.cc (_dll_crt0): Check for changes in child_info size. (multiple_cygwin_problem): Avoid "proc" errors when testing. Just assume new cygwin proc. * shared_info.h (mount_info): Add 'cb' element for sanity checks. (shared_info): Ditto. * child_info.h (child_info): Add fhandler_union_size element for sanity checking. * shared.cc (open_shared): Detect shared region size mismatch between parent and child. (shared_info::initialize): Detect shared region size mismatch with expectation. (memory_Init): Ditto. * sigproc.cc (init_child_info): Correctly set cb in passed structure. * shared.cc (open_shared): --- winsup/cygwin/sigproc.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/sigproc.cc') diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 6527313ec..2e409820a 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -857,13 +857,14 @@ void __stdcall init_child_info (DWORD chtype, child_info *ch, pid_t pid, HANDLE subproc_ready) { memset (ch, 0, sizeof *ch); - ch->cb = sizeof *ch; + ch->cb = chtype == PROC_FORK ? sizeof (child_info_fork) : sizeof (child_info); ch->intro = PROC_MAGIC_GENERIC; ch->magic = CHILD_INFO_MAGIC; ch->type = chtype; ch->cygpid = pid; ch->subproc_ready = subproc_ready; ch->pppid_handle = myself->ppid_handle; + ch->fhandler_union_cb = sizeof (fhandler_union); } /* Check the state of all of our children to see if any are stopped or -- cgit v1.2.3