* child_info.h (_CI_SAW_CTRL_C): New enum.
(CURR_CHILD_INFO_MAGIC): Reset. (saw_ctrl_c): New function. (set_saw_ctrl_c): Ditto. * sigproc.cc (child_info::proc_retry): Return EXITCODE_OK if we get STATUS_CONTROL_C_EXIT and we actually saw a CTRL-C. * spawn.cc (dwExeced): Delete. (chExeced): New variable. (spawn_guts): Set chExeced; * exceptions.cc (dwExeced): Delete declaration. (chExeced): Declare. (ctrl_c_handler): Detect if we're an exec stub process and set a flag, if so. * fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Add extra DEBUGGING test. * pinfo.cc: Fix comment.
This commit is contained in:
@ -31,6 +31,7 @@ details. */
|
||||
#include "fhandler.h"
|
||||
#include "dtable.h"
|
||||
#include "cygheap.h"
|
||||
#include "child_info.h"
|
||||
|
||||
#define CALL_HANDLER_RETRY 20
|
||||
|
||||
@ -40,7 +41,7 @@ extern "C" {
|
||||
extern void sigdelayed ();
|
||||
};
|
||||
|
||||
extern NO_COPY DWORD dwExeced;
|
||||
extern child_info_spawn *chExeced;
|
||||
int NO_COPY sigExeced;
|
||||
|
||||
static BOOL WINAPI ctrl_c_handler (DWORD);
|
||||
@ -944,10 +945,11 @@ ctrl_c_handler (DWORD type)
|
||||
}
|
||||
}
|
||||
|
||||
/* If we are a stub and the new process has a pinfo structure, let it
|
||||
handle this signal. */
|
||||
if (dwExeced && pinfo (dwExeced))
|
||||
return TRUE;
|
||||
if (chExeced)
|
||||
{
|
||||
chExeced->set_saw_ctrl_c ();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* We're only the process group leader when we have a valid pinfo structure.
|
||||
If we don't have one, then the parent "stub" will handle the signal. */
|
||||
|
Reference in New Issue
Block a user