From 84d38174056e438860213eb0cda919df89c06bd2 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 13 Mar 2006 21:10:14 +0000 Subject: * child_info.h (child_info_fork::handle_failure): Declare new function. (child_info_fork::retry): New field. * dcrt0.cc (__api_fatal_exit_val): Define. (child_info_fork::handle_failure): Define new function. (__api_fatal): Exit using __api_fatal_exit_val value. * environ.cc (set_fork_retry): Set fork_retry based on CYGWIN environment variable. (parse_thing): Add "fork_retry" setting. * fork.cc (fork_retry): Define. (frok::parent): Reorganize to allow retry of failed child creation if child signalled that it was ok to do so. * heap.cc (heap_init): Signal parent via handle_failure when VirtualAlloc fails. * pinfo.h (EXITCODE_RETRY): Declare. * sigproc.cc (child_info::sync): Properly exit with failure condition if called for fork and didn't see subproc_ready. * spawn.cc (spawn_guts): Use windows pid as first argument. * winsup.h: Remove obsolete NEW_MACRO_VARARGS define. (__api_fatal_exit_val): Declare. (set_api_fatal_return): Define. (in_dllentry): Declare. * exceptions.cc (inside_kernel): Remove unneeded in_dllentry declaration. --- winsup/cygwin/child_info.h | 4 +++- 1 file changed, 3 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 9e6433dd5..03e8af58f 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 0xc87757a7U +#define CURR_CHILD_INFO_MAGIC 0x4160e87bU /* NOTE: Do not make gratuitous changes to the names or organization of the below class. The layout is checksummed to determine compatibility between @@ -68,8 +68,10 @@ public: jmp_buf jmp; // where child will jump to void *stacktop; // location of top of parent stack void *stackbottom; // location of bottom of parent stack + int retry; // number of times we've tried to fork child_info_fork (); void handle_fork (); + bool handle_failure (DWORD); }; class fhandler_base; -- cgit v1.2.3