diff options
author | Christopher Faylor <me@cgf.cx> | 2006-03-18 19:17:21 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-03-18 19:17:21 +0000 |
commit | a939686807dd8e832939fddf514040fdba7077d8 (patch) | |
tree | e9e816e39dde05a3353c9137c9763f6d474adac9 /winsup/cygwin/child_info.h | |
parent | 61337a0f4594e1301011b775a6f9672fc58b4ec0 (diff) | |
download | cygnal-a939686807dd8e832939fddf514040fdba7077d8.tar.gz cygnal-a939686807dd8e832939fddf514040fdba7077d8.tar.bz2 cygnal-a939686807dd8e832939fddf514040fdba7077d8.zip |
* child_info.h (CURR_CHILD_INFO_MAGIC): Regenerate.
(child_info::retry): Move here from fork subclass.
(child_info::exit_code): New field.
(child_info::retry_count): Max retry count for process start.
(child_info::proc_retry): Declare new function.
(child_info_fork::retry): Move to parent.
(child_info_fork::fork_retry): Ditto.
* dcrt0.cc (child_info::fork_retry): Rename and move.
(child_info_fork::handle_failure): Move.
(dll_crt0_0): Initialize console handler based on whether we have a controlling
tty or not. Avoid nonsensical check for fork where it can never occur.
* environ.cc (set_proc_retry): Rename from set_fork_retry. Set retry_count in
child_info.
(parse_thing): Reflect above change.
* exceptions.cc (dummy_ctrl_c_handler): Remove unused variable name.
(ctrl_c_handler): Always return TRUE for the annoying CTRL_LOGOFF_EVENT.
* fhandler_termios.cc (fhandler_termios::tcsetpgrp): Remove call to
init_console_handler.
* fhandler_tty.cc (fhandler_tty_slave::open): Just call mange_console_count
here and let it decide what to do with initializing console control handling.
* fork.cc (fork_retry): Remove definition.
(frok::parent): Define static errbuf and use in error messages (not thread safe
yet). Close pi.hThread as soon as possible. Protect pi.hProcess as soon as
possible. Don't set retry_count. That happens automatically in the
constructor now. Accommodate name change from fork_retry to proc_retry.
* init.cc (dll_entry): Turn off ctrl-c handling early until we know how it is
supposed to be handled.
* pinfo.cc (_pinfo::dup_proc_pipe): Remember original proc pipe value for
failure error message. Tweak debug message slightly.
* sigproc.cc (child_info::retry_count): Define.
(child_info::child_info): Initialize retry count.
(child_info::sync): Set exit code if process dies before synchronization.
(child_info::proc_retry): Rename from child_info_fork::fork_retry. Use
previously derived exit code. Be more defensive about what is classified as an
error exit.
(child_info_fork::handle_failure): Move here from dcrt0.cc.
* spawn.cc (spawn_guts): Maintain error mode when starting new process to avoid
annoying pop ups. Move deimpersonate call within new loop. Move envblock
freeing to end. Loop if process dies prematurely with bad exit code.
* syscalls.cc (init_console_handler): Remove hopefully unneeded call to
init_console_handler.
Diffstat (limited to 'winsup/cygwin/child_info.h')
-rw-r--r-- | winsup/cygwin/child_info.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/child_info.h index 87da6e453..efca03465 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 0x88e640f7U +#define CURR_CHILD_INFO_MAGIC 0x482b2eaU /* NOTE: Do not make gratuitous changes to the names or organization of the below class. The layout is checksummed to determine compatibility between @@ -50,11 +50,15 @@ public: DWORD cygheap_reserve_sz; unsigned char straced; unsigned fhandler_union_cb; + int retry; // number of times we've tried to start child process + DWORD exit_code; // process exit code + static int retry_count;// retry count; 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))); + DWORD proc_retry (HANDLE); }; class mount_info; @@ -68,11 +72,9 @@ 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); - DWORD fork_retry (HANDLE); }; class fhandler_base; |