At 04:41 AM 5/10/00, Adrian Aichner wrote:
>>>>> "Mike" == Mike Alexander
<mta(a)arbortext.com> writes:
Mike> about memory layout. When we call run_in_other_process,
Mike> we're going to allocate memory in the child process which
Mike> will affect the layout of memory if it's done too soon.
Mike> That's what was confusing the MSK Toolkit shell Shades of
Mike> non-portable dumping in XEmacs.
I don't understand the last sentence above.
You can ignore that sentence, it was simply a parenthetical comment. The problems people
have been having with running XEmacs on Windows without portable dumping are due to the
fact that XEmacs needs to allocate memory at a specific location when it starts up (so it
can reload the dump data). If memory at that location is not available it fails. I
presume that something similar is going on inside of the MKS Toolkit shell. That's
all I was trying to say.
Mike> I have three different versions of sleep on my machine:
(1)
Mike> the one you tried which came with Cygwin 1.1, (2) the one in
Mike> the NT Resource Kit, and (3) the one that came with the MKS
Mike> Toolkit. For each of them I tried starting it with (for
Mike> example)
Mike> (start-process "sleep" nil "C:/cygwin/bin/sleep.exe"
"3000")
Mike> and then interrupting it with (interrupt-process "sleep").
Mike> It turns out that (1) fails to interrupt regardless of
Mike> whether my patch is in or not and both (2) and (3) work
Mike> fine, they are interruptible regardless of whether the patch
Mike> is in or not. All three are killed by kill-process whether
Mike> or not the patch is in. This is running on NT 4.0 SP 5,
Mike> which may not be the same system you are using.
I have NT 4.0 SP 5 also, VS C++ 6.0.
I can interrupt the sleep process when started with:
(start-process "sleepy" nil "sleep" "60")
(interrupt-process "sleepy")
I cannot interrupt it, when started und "a shell":
(start-process "shell" nil "cmd" "/c" "sleep"
"60")
(interrupt-process "shell" t)
Are you saying you cannot even interrupt the first case above?
Yes, that's what I'm saying. In the second case, the process that XEmacs is
trying to send the Control-C to is the shell process, not the sleep process. The shell
will pass it on to the sleep process if it sees it, but it isn't seeing it.
What about following perl example?
(start-process "perl-forever" nil "perl" "-e"
"\"while(1) {};\"")
(interrupt-process "perl-forever" t)
I get
#<process "perl-forever" pid 338 state:run>
Cannot send signal to process
#<process "perl-forever" pid 343 state:run>
Cannot send signal to process
#<process "perl-forever" pid 339 state:run>
Cannot send signal to process
consistently, but each process gets killed.
I haven't tried this test yet. I suspect the error message about failing to send the
signal is due to the one bug I've actually fixed so far in this search. It's just
a botch testing the return code from sending the signal.
All of my examples above are run from
(emacs-version)
"XEmacs 21.1 (patch 10) \"Capitol Reef\" [Lucid] (i386-pc-win32) of
Sun May 07 2000 on ZJ75T"
with my patch
http://www.xemacs.org/list-archives/xemacs-patches/200005/msg00016.html
applied.
I'm using the current CVS source as of yesterday with a similar patch applied.
It's possible that's why we're seeing slightly different (but still incorrect)
behavior.
I order to track this down I'll probably need to run some small test cases and do some
more detailed investigation about sending signals to subprocesses in Windows. This may
take a while since I have real work to do which needs to take priority.
Mike