diff options
author | Christopher Faylor <me@cgf.cx> | 2006-03-13 21:10:14 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-03-13 21:10:14 +0000 |
commit | 84d38174056e438860213eb0cda919df89c06bd2 (patch) | |
tree | 061d434bdf553f8de3ea11667fdeeea29d7390a7 /winsup/cygwin/environ.cc | |
parent | 063fd1266048237629929240f923065bf9941abb (diff) | |
download | newlib-84d38174056e438860213eb0cda919df89c06bd2.zip newlib-84d38174056e438860213eb0cda919df89c06bd2.tar.gz newlib-84d38174056e438860213eb0cda919df89c06bd2.tar.bz2 |
* 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.
Diffstat (limited to 'winsup/cygwin/environ.cc')
-rw-r--r-- | winsup/cygwin/environ.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index eb99d2b..23d0993 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -39,6 +39,7 @@ static bool envcache = true; #ifdef USE_SERVER extern bool allow_server; #endif +extern int fork_retry; static char **lastenviron; @@ -515,7 +516,13 @@ subauth_id_init (const char *buf) static void set_chunksize (const char *buf) { - wincap.set_chunksize (strtol (buf, NULL, 0)); + wincap.set_chunksize (strtoul (buf, NULL, 0)); +} + +static void +set_fork_retry (const char *buf) +{ + fork_retry = strtoul (buf, NULL, 0); } static void @@ -587,6 +594,7 @@ static struct parse_thing {"tty", {NULL}, set_process_state, NULL, {{0}, {PID_USETTY}}}, {"winsymlinks", {&allow_winsymlinks}, justset, NULL, {{false}, {true}}}, {"transparent_exe", {&transparent_exe}, justset, NULL, {{false}, {true}}}, + {"fork_retry", {func: set_fork_retry}, isfunc, NULL, {{0}, {5}}}, {NULL, {0}, justset, 0, {{0}, {0}}} }; |