* child_info.h (child_info::sync): Pass pid and HANDLE rather than using pinfo.
(child_info::child_info): Accept an argument controlling whether to create proc_subproc. (child_info_spawn::child_info_spawn): Ditto. * sigproc.cc (child_info::child_info): Ditto. (child_info_spawn::child_info_spawn): Ditto. (child_info::sync): Use passed in pid and HANDLE. * fork.cc (fork_parent): Reflect additional arguments required for child_info::sync. * hookapi.cc (hook_or_detect_cygwin): Rename. Change so that NULL 'fn' argument just returns "true", indicating that program uses cygwin1.dll. * spawn.cc (av::win16_exe): New element. * spawn.cc (av::iscygwin): New element. (av::fixup): New function. (spawn_guts): Protect against SEGV. Use fixup function to detect when it is safe to wait for a spawned (as opposed to an execed) program. Reflect changes in child_info::sync arguments. * external.cc (cygwin_internal): Reflect function renaming to hook_or_detect_cygwin. * cygheap.cc (cygheap_fixup_in_child): Close handle after debug fixup has been done to prevent false positives in handle collision. * exceptions.cc (try_to_debug): Notify debugger if already being debugged.
This commit is contained in:
@@ -29,7 +29,7 @@ enum child_info_types
|
||||
|
||||
#define EXEC_MAGIC_SIZE sizeof(child_info)
|
||||
|
||||
#define CURR_CHILD_INFO_MAGIC 0xd94c588aU
|
||||
#define CURR_CHILD_INFO_MAGIC 0x5eecb012U
|
||||
|
||||
/* NOTE: Do not make gratuitous changes to the names or organization of the
|
||||
below class. The layout is checksummed to determine compatibility between
|
||||
@@ -50,10 +50,10 @@ public:
|
||||
DWORD cygheap_reserve_sz;
|
||||
DWORD dwProcessId;
|
||||
unsigned fhandler_union_cb;
|
||||
child_info (unsigned, child_info_types);
|
||||
child_info (unsigned, child_info_types, bool);
|
||||
~child_info ();
|
||||
void ready (bool);
|
||||
bool sync (pinfo&, DWORD);
|
||||
bool sync (int, HANDLE, DWORD) __attribute__ ((regparm (3)));
|
||||
};
|
||||
|
||||
class mount_info;
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
cfree (moreinfo);
|
||||
}
|
||||
}
|
||||
child_info_spawn (child_info_types);
|
||||
child_info_spawn (child_info_types, bool);
|
||||
};
|
||||
|
||||
void __stdcall init_child_info (DWORD, child_info *, HANDLE);
|
||||
|
Reference in New Issue
Block a user