diff options
author | Christopher Faylor <me@cgf.cx> | 2001-12-26 04:53:34 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-12-26 04:53:34 +0000 |
commit | 77f4a2502895c8c619da30c3ddee12f0695ad05f (patch) | |
tree | 455be9610a9b615149ebd2687f40e82323a865f3 /winsup/cygwin/child_info.h | |
parent | f6eff1c04649af4f2a18c434d9be2870c24cc668 (diff) | |
download | cygnal-77f4a2502895c8c619da30c3ddee12f0695ad05f.tar.gz cygnal-77f4a2502895c8c619da30c3ddee12f0695ad05f.tar.bz2 cygnal-77f4a2502895c8c619da30c3ddee12f0695ad05f.zip |
* Makefile.in: Autogenerate some header files which provide magic numbers.
Force dependencies for files which depend on autogenerated headers to ensure
that they are always built.
* child_info.h (child_info): Add new fields to accommodate new magic number
header stuff.
* dcrt0.cc: Rely on "child_info_magic.h" to ensure that correct child_info
magic numbers are used.
(dll_crt0_1): Temporarily remove _cygwin_testing_magic test.
(_dll_crt0): Do more testing on magic numbers from fork_info structure. Call
"multiple_cygwin_problem" where appropriate.
(multiple_cygwin_problem): Rename from multiple_cygwin_die. Issue a warning or
die, as appropriate based on cygwin version/magic number mismatch.
* pinfo.cc (pinfo::exit): Don't attempt to dereference `this' if it doesn't
exist. This can happen when a fatal error occurs early in process
initialization.
* shared.cc: Rely on "shared_info_magic.h" to accommodate that new magic number
header stuff.
(shared_info::initialize): Use new magic number stuff, for shared region.
(memory_init): Ditto, for mount table.
* shared_info.h: Accomodate new magic number stuff for shared region and mount
table.
* sigproc.cc: Rely on "child_info_magic.h" to accommodate new magic number
header stuff.
(init_child_info): Initialize new fields in child_info) to accomodate magic
numbers.
* winsup.h: Rename multiple_cygwin_die to multiple_cygwin_problem.
* include/cygwin/version.h: Define macros for manipulating version magic.
* cygmagic: New shell script for generating magic numbers.
Diffstat (limited to 'winsup/cygwin/child_info.h')
-rw-r--r-- | winsup/cygwin/child_info.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/child_info.h index e744f5bcf..5b7f219a6 100644 --- a/winsup/cygwin/child_info.h +++ b/winsup/cygwin/child_info.h @@ -12,28 +12,32 @@ details. */ enum { - PROC_MAGIC = 0xaf12f000, - _PROC_EXEC = PROC_MAGIC + 2, - _PROC_SPAWN = PROC_MAGIC + 3, - _PROC_FORK = PROC_MAGIC + 4, // Newer versions provide stack - // location information + _PROC_EXEC, + _PROC_SPAWN, + _PROC_FORK }; -#define PROC_MAGIC_MASK 0xff00f000 -#define PROC_MAGIC_GENERIC 0xaf00f000 -#define PROC_MAGIC_VER_MASK 0x0ff0000 +#define OPROC_MAGIC_MASK 0xff00ff00 +#define OPROC_MAGIC_GENERIC 0xaf00f000 -#define PROC_EXEC (_PROC_EXEC + _cygwin_testing_magic) -#define PROC_SPAWN (_PROC_SPAWN + _cygwin_testing_magic) -#define PROC_FORK (_PROC_FORK + _cygwin_testing_magic) +#define PROC_MAGIC_GENERIC 0xaf00fa00 + +#define PROC_EXEC (_PROC_EXEC) +#define PROC_SPAWN (_PROC_SPAWN) +#define PROC_FORK (_PROC_FORK) #define EXEC_MAGIC_SIZE sizeof(child_info) + +#define CURR_CHILD_INFO_MAGIC 0xba17 + class child_info { public: DWORD zero[4]; // must be zeroed DWORD cb; // size of this record - DWORD type; // type of record + DWORD intro; // improbable string + unsigned short magic; // magic number unique to child_info + unsigned short type; // type of record, exec, spawn, fork int cygpid; // cygwin pid of child process HANDLE subproc_ready; // used for synchronization with parent HANDLE mount_h; |