* child_info.h (child_info): Add pppid_handle for closing the parent's of the

parent handle.
* dcrt0.cc (_dll_crt0): Close parent's parent handle when spawned or forked.
* debug.cc (add_handle): Correct erroneous reference to handle structure when
printing warning.
* exceptions.cc (interrupt_now): Always return 1.
(interrupt_on_return): Accept a sigthread argument.  Check to see if this
argument has been trashed prior to setting up the stack return.
(call_handler): Add a loop around attempts to dispatch signals to detect case
where interrupt_on_return fails.
(_sigdelayed): Set up a temporary frame pointer prior to calling stuff that
could trigger an interrupt or the stack walking code will be very confused.
* fork.cc (fork_parent): Move a lot of the setup of the child process into
proc_subproc.
* spawn.cc (spawn_guts): Ditto.  Use ppid_handle to contact logical parent when
reparenting.
* pinfo.h (_pinfo): Remember the logical handle of the parent process.
* sigproc.cc (proc_subproc): Record most stuff necessary for the _pinfo
structure that is inferrable from myself when adding children.
(wait_sig): Always set 'pending_signals' flag when about to kick off the signal
scanning loop.  Reset it only if there are no pending signals.
This commit is contained in:
Christopher Faylor
2000-11-06 06:36:32 +00:00
parent e0997f5a0f
commit dd11f11fae
9 changed files with 189 additions and 142 deletions

View File

@@ -12,7 +12,7 @@ details. */
enum
{
PROC_MAGIC = 0xaf09f000,
PROC_MAGIC = 0xaf0af000,
PROC_FORK = PROC_MAGIC + 1,
PROC_EXEC = PROC_MAGIC + 2,
PROC_SPAWN = PROC_MAGIC + 3,
@@ -38,6 +38,7 @@ public:
HANDLE console_h;
HANDLE parent_alive; // handle of thread used to track children
HANDLE parent;
HANDLE pppid_handle;
void *cygheap;
void *cygheap_max;
};