>>>> "Ben" == Ben Wing <ben(a)666.com>
writes:
Ben> adrian, i think the stderr changes are unrelated. you
Ben> probably shouldn't back them out, just the
Ben> enable_child_signals changes.
OK, here's a revised patch tested against 21.1.10 vanilla.
It retains STDERR handling improvements.
Best regards,
Adrian
cd d:\tmp\21.1\xemacs\
cvs diff src
Compilation started at Sun May 07 17:23:56 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 15:31:54
@@ -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))
@@ -469,7 +468,7 @@
/* Duplicate the stdout handle for use as stderr */
DuplicateHandle(GetCurrentProcess(), hprocout, GetCurrentProcess(), &hprocerr,
- 0, TRUE, DUPLICATE_SAME_ACCESS);
+ 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
@@ -598,7 +597,7 @@
{
si.hStdInput = hprocin;
si.hStdOutput = hprocout;
- si.hStdError = hprocerr;
+ si.hStdError = hprocerr;
si.dwFlags |= STARTF_USESTDHANDLES;
}
@@ -613,7 +612,7 @@
/* These just have been inherited; we do not need a copy */
CloseHandle (hprocin);
CloseHandle (hprocout);
- CloseHandle (hprocerr);
+ CloseHandle (hprocerr);
}
/* Handle process creation failure */
@@ -640,18 +639,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 +663,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 +763,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 17:24:10
--
Adrian Aichner <adrian(a)xemacs.org>