At 03:46 AM 10/25/99 +0200, Adrian Aichner wrote:
>>>>> "Craig" == Craig Lanning
<CraigL(a)DyCon.com> writes:
Craig> The individual calls to call-process worked just fine so I
Craig> decided to give it your stress test. I started the
Craig> (dotimes ...) and things seemed to be working fine. You
Craig> had asked that I do things while this is running so I
Craig> started iconifying and deiconifying programs, when suddenly
Craig> the blue screen of death appeared. It complained that
Craig> Window's resources were low and asked me if I wanted to
Craig> kill a particular program. The BSoD appeared several more
Craig> times, each time asking about a different program. The
Craig> first program was Explorer. Others were XEmacs, grep, and
Craig> one of the items in the System Tray.
Craig> This sounds like something is not being returned to the OS.
Right on, Craig!
After some heavy (call-process ...) testing I saw some 500 handled
being taken by XEmacs. On NT, however, you don't notice this too much.
So I analyzed and went back to cook up another patch which I'm quite
happy with.
I fixed the bugs where
o a process handle would not be closed for
(call-process "prog" nil 0 ...)
o the STDERR handle opened for
(call-process "prog" nil '(... nil) ...)
(call-process "prog" nil '(... "filename") ...)
would not be closed in the parent on NT.
Also, I took out all the tests for
if (os_subtype == OS_WIN95) {
since the MINGWIN32 build cannot detect it and you're still OK on Win98.
Even under vigorous testing only 0 to 4 handles may remain after
running a couple hundred processes on Windows NT.
But even when doing other things in XEmacs on NT native, unrelated to
call-process, like M-x shell and quiting it again, a few handles seem
to leak.
What it boils down to:
Please try following patch once more and give it a tough test if
things look good. This patch was created against lastest 21.2 CVS.
Cheers,
Adrian
PS: Dan, do you have a compiler yet? This baby needs some testing.
[patch deleted]
I have now updated from CVS, applied this patch, and recompiled.
Individual tests work!
Package updates via PUI work!!! (better that they used to)
Stress test:
(dotimes (i 200 "grep test passed")
(unless
(zerop (call-process "grep" nil '(t nil) nil
"drivers" "c:\winnt\system.ini"))
(error "Incorrect call-process return value!")))
runs to completion without showing the Blue Screen of Death!!!!!
It first glance, I would say that we have a winner.
Craig
P.S. When I quit XEmacs (c-X c-C) the following was printed to STDERR:
Fatal error: assertion failed, file console.h, line 419, RECORD_TYPEP (obj,
&lrecord_console)
and the shell hung waiting for XEmacs to exit.
Otherwise nothing was printed to STDERR!