From ff7bdd11f5006425b408e4c9f324db85cda6c1d7 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 11 Aug 2005 16:13:30 +0000 Subject: * child_info. (CURR_CHILD_INFO_MAGIC): Refresh. (child_info::child_info()): New constructor. (child_info_spawn::child_info_spawn()): Ditto. (child_info_spawn::operator new): New operator. (child_info_spawn::set): New function. * spawn.cc (av()): New constructor. (av::operator new): New operator. (av::set): New function. (spawn_guts): Reorganize so that classes which allocates are defined early in the function so that it can be properly cleaned up after an efault. Set errno to E2BIG in the event of a SEGV situation. --- winsup/cygwin/child_info.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/child_info.h') diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/child_info.h index c079fe226..dc6a72457 100644 --- a/winsup/cygwin/child_info.h +++ b/winsup/cygwin/child_info.h @@ -29,7 +29,7 @@ enum child_info_types #define EXEC_MAGIC_SIZE sizeof(child_info) -#define CURR_CHILD_INFO_MAGIC 0x5eecb012U +#define CURR_CHILD_INFO_MAGIC 0x38772070U /* NOTE: Do not make gratuitous changes to the names or organization of the below class. The layout is checksummed to determine compatibility between @@ -51,6 +51,7 @@ public: DWORD dwProcessId; unsigned fhandler_union_cb; child_info (unsigned, child_info_types, bool); + child_info (): subproc_ready (NULL), parent (NULL) {} ~child_info (); void ready (bool); bool sync (int, HANDLE, DWORD) __attribute__ ((regparm (3))); @@ -104,7 +105,10 @@ public: cfree (moreinfo); } } + child_info_spawn (): moreinfo (NULL) {}; child_info_spawn (child_info_types, bool); + void *operator new (size_t, void *p) __attribute__ ((nothrow)) {return p;} + void set (child_info_types ci, bool b) { new (this) child_info_spawn (ci, b);} }; void __stdcall init_child_info (DWORD, child_info *, HANDLE); -- cgit v1.2.3