>>>> "Mike" == Mike Alexander
<mta(a)arbortext.com> writes:
Mike> Index: src/process-nt.c
Mike> ===================================================================
Mike> RCS file: /usr/CVSroot/XEmacs/xemacs/src/process-nt.c,v
Mike> retrieving revision 1.11.2.6
Mike> diff -u -r1.11.2.6 process-nt.c
Mike> --- process-nt.c 1999/10/24 09:25:03 1.11.2.6
Mike> +++ process-nt.c 1999/11/23 04:35:20
Following hunk breaks kill-compilation in native NT XEmacs 21.1.10,
21.2-b33 and some earlier versions (21.1.7 does not have the problem
yet).
Here is a backout patch (Mike's original patch was broken due to
line-wrapping and is not cleanly --reverse -ible) to fix 21.1.10 and
21.2-b33 until Mike gives it another shot.
Please advise,
Adrian
Mike> @@ -640,12 +646,18 @@
Mike> CloseHandle (pi.hProcess);
Mike> }
Mike> - if (!windowed)
Mike> - enable_child_signals (pi.hProcess);
Mike> -
Mike> ResumeThread (pi.hThread);
Mike> CloseHandle (pi.hThread);
Mike> + /* Remember to enable child signals later if this is not a windowed
Mike> + app. Can't do it right now because that screws up the MKS
Toolkit
Mike> + shell. */
Mike> + if (!windowed)
Mike> + {
Mike> + NT_DATA(p)->need_enable_child_signals = 10;
Mike> + kick_status_notify ();
Mike> + }
Mike> +
cd d:\tmp\21.1\xemacs\
cvs diff src
Compilation started at Sun May 07 14:15:35 2000 +0200 (W. Europe Daylight Time)
? src/call-process.err
? src/cvs-update.err
? src/SATISFIED
? src/stat-fstat
? src/stat-fstat-h
? src/temacs.bsc
? src/temacs.map
? src/xemacs.opt
cvs server: Diffing src
Index: src/process-nt.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/process-nt.c,v
retrieving revision 1.15
diff -u -r1.15 process-nt.c
--- process-nt.c 1999/12/04 04:13:05 1.15
+++ process-nt.c 2000/05/07 12:23:18
@@ -49,7 +49,6 @@
struct nt_process_data
{
HANDLE h_process;
- int need_enable_child_signals;
};
#define NT_DATA(p) ((struct nt_process_data*)((p)->process_data))
@@ -416,7 +415,7 @@
Lisp_Object *argv, int nargv,
Lisp_Object program, Lisp_Object cur_dir)
{
- HANDLE hmyshove, hmyslurp, hprocin, hprocout, hprocerr;
+ HANDLE hmyshove, hmyslurp, hprocin, hprocout;
LPTSTR command_line;
BOOL do_io, windowed;
char *proc_env;
@@ -467,10 +466,6 @@
CreatePipe (&hprocin, &hmyshove, &sa, 0);
CreatePipe (&hmyslurp, &hprocout, &sa, 0);
- /* Duplicate the stdout handle for use as stderr */
- DuplicateHandle(GetCurrentProcess(), hprocout, GetCurrentProcess(), &hprocerr,
- 0, TRUE, DUPLICATE_SAME_ACCESS);
-
/* Stupid Win32 allows to create a pipe with *both* ends either
inheritable or not. We need process ends inheritable, and local
ends not inheritable. */
@@ -598,7 +593,7 @@
{
si.hStdInput = hprocin;
si.hStdOutput = hprocout;
- si.hStdError = hprocerr;
+ si.hStdError = hprocout;
si.dwFlags |= STARTF_USESTDHANDLES;
}
@@ -613,7 +608,6 @@
/* These just have been inherited; we do not need a copy */
CloseHandle (hprocin);
CloseHandle (hprocout);
- CloseHandle (hprocerr);
}
/* Handle process creation failure */
@@ -640,18 +634,12 @@
CloseHandle (pi.hProcess);
}
+ if (!windowed)
+ enable_child_signals (pi.hProcess);
+
ResumeThread (pi.hThread);
CloseHandle (pi.hThread);
- /* Remember to enable child signals later if this is not a windowed
- app. Can't do it right now because that screws up the MKS Toolkit
- shell. */
- if (!windowed)
- {
- NT_DATA(p)->need_enable_child_signals = 10;
- kick_status_notify ();
- }
-
/* Hack to support Windows 95 negative pids */
return ((int)pi.dwProcessId < 0
? -(int)pi.dwProcessId : (int)pi.dwProcessId);
@@ -670,18 +658,6 @@
nt_update_status_if_terminated (struct Lisp_Process* p)
{
DWORD exit_code;
-
- if (NT_DATA(p)->need_enable_child_signals > 1)
- {
- NT_DATA(p)->need_enable_child_signals -= 1;
- kick_status_notify ();
- }
- else if (NT_DATA(p)->need_enable_child_signals == 1)
- {
- enable_child_signals(NT_DATA(p)->h_process);
- NT_DATA(p)->need_enable_child_signals = 0;
- }
-
if (GetExitCodeProcess (NT_DATA(p)->h_process, &exit_code)
&& exit_code != STILL_ACTIVE)
{
@@ -782,14 +758,6 @@
int current_group, int nomsg)
{
struct Lisp_Process *p = XPROCESS (proc);
-
- /* Enable child signals if necessary. This may lose the first
- but it's better than nothing. */
- if (NT_DATA(p)->need_enable_child_signals > 0)
- {
- enable_child_signals(NT_DATA(p)->h_process);
- NT_DATA(p)->need_enable_child_signals = 0;
- }
/* Signal error if SIGNO cannot be sent */
validate_signal_number (signo);
Compilation exited abnormally with code 1 at Sun May 07 14:15:49
--
Adrian Aichner <adrian(a)xemacs.org>