Hello All!
I have fixed this before in XEmacs 21.1.
The problem is back now.
I determined the number of handles remaining after each invocation of
call-process by looking at the Handles column in Windows NT Task
Manager using following test-case:
(defun test-call-process (stdout stderr)
(let ((buffer (if (numberp stderr) stdout (list stdout stderr))))
(apply 'call-process "grep" nil buffer nil
(list "passangers" "c:\\winnt\\system.ini"))
buffer))
(with-output-to-temp-buffer
"call-process breakage"
(dolist (out
(list
0
t
nil
(get-buffer-create "*GREP*")
"*GREP*"))
(dolist (err '(0 t nil "STDERR.txt") "STDERR list done")
(princ
(format "BUFFER %40S, %d handle(s) remaining.\n"
(test-call-process out err)
(read-number
"How many additional handles remain? "
'integer))))))
;;;; Before conditionalizing OpenProcess() on !INTP (buffer)
;;;; and closing fd_error in Fcall_process_internal():
;;; Some patch level of XEmacs 21.1
BUFFER 0, 1 handle(s) remaining.
BUFFER (0 t), 1 handle(s) remaining.
BUFFER (0 nil), 2 handle(s) remaining.
BUFFER (0 "STDERR.txt"), 2 handle(s) remaining.
BUFFER t, 0 handle(s) remaining.
BUFFER (t t), 0 handle(s) remaining.
BUFFER (t nil), 1 handle(s) remaining.
BUFFER (t "STDERR.txt"), 1 handle(s) remaining.
BUFFER nil, 0 handle(s) remaining.
BUFFER (nil t), 0 handle(s) remaining.
BUFFER (nil nil), 1 handle(s) remaining.
BUFFER (nil "STDERR.txt"), 1 handle(s) remaining.
BUFFER #<buffer "*GREP*">, 0 handle(s) remaining.
BUFFER (#<buffer "*GREP*"> t), 0 handle(s) remaining.
BUFFER (#<buffer "*GREP*"> nil), 1 handle(s) remaining.
BUFFER (#<buffer "*GREP*"> "STDERR.txt"), 1 handle(s)
remaining.
BUFFER "*GREP*", 0 handle(s) remaining.
BUFFER ("*GREP*" t), 0 handle(s) remaining.
BUFFER ("*GREP*" nil), 1 handle(s) remaining.
BUFFER ("*GREP*" "STDERR.txt"), 1 handle(s)
remaining.
;;;; ... and after fixing this, hurrah!
;;; Some patch level of XEmacs 21.1
BUFFER 0, 0 handle(s) remaining.
BUFFER (0 t), 0 handle(s) remaining.
BUFFER (0 nil), 0 handle(s) remaining.
BUFFER (0 "STDERR.txt"), 0 handle(s) remaining.
BUFFER t, 0 handle(s) remaining.
BUFFER (t t), 0 handle(s) remaining.
BUFFER (t nil), 0 handle(s) remaining.
BUFFER (t "STDERR.txt"), 0 handle(s) remaining.
BUFFER nil, 0 handle(s) remaining.
BUFFER (nil t), 0 handle(s) remaining.
BUFFER (nil nil), 0 handle(s) remaining.
BUFFER (nil "STDERR.txt"), 0 handle(s) remaining.
BUFFER #<buffer "*GREP*">, 0 handle(s) remaining.
BUFFER (#<buffer "*GREP*"> t), 0 handle(s) remaining.
BUFFER (#<buffer "*GREP*"> nil), 0 handle(s) remaining.
BUFFER (#<buffer "*GREP*"> "STDERR.txt"), 0 handle(s)
remaining.
BUFFER "*GREP*", 0 handle(s) remaining.
BUFFER ("*GREP*" t), 0 handle(s) remaining.
BUFFER ("*GREP*" nil), 0 handle(s) remaining.
BUFFER ("*GREP*" "STDERR.txt"), 0 handle(s)
remaining.
(emacs-version)
"XEmacs 21.2 (beta33) \"Melpomene\" [Lucid] (i586-pc-win32) of Sun May
21 2000 on ZJ75T" updated at approx.
(current-time-string)
"Sun May 21 00:22:56 2000"
(current-time-zone)
(7200 "W. Europe Daylight Time")
BUFFER 0, 2 handle(s) remaining.
BUFFER (0 t), 2 handle(s) remaining.
BUFFER (0 nil), 2 handle(s) remaining.
BUFFER (0 "STDERR.txt"), 4 handle(s) remaining.
BUFFER t, 2 handle(s) remaining.
BUFFER (t t), 2 handle(s) remaining.
BUFFER (t nil), 2 handle(s) remaining.
BUFFER (t "STDERR.txt"), 4 handle(s) remaining.
BUFFER nil, 2 handle(s) remaining.
BUFFER (nil t), 2 handle(s) remaining.
BUFFER (nil nil), 2 handle(s) remaining.
BUFFER (nil "STDERR.txt"), 4 handle(s) remaining.
BUFFER #<buffer "*GREP*">, 2 handle(s) remaining.
BUFFER (#<buffer "*GREP*"> t), 2 handle(s) remaining.
BUFFER (#<buffer "*GREP*"> nil), 2 handle(s) remaining.
BUFFER (#<buffer "*GREP*"> "STDERR.txt"), 4 handle(s)
remaining.
BUFFER "*GREP*", 2 handle(s) remaining.
BUFFER ("*GREP*" t), 2 handle(s) remaining.
BUFFER ("*GREP*" nil), 2 handle(s) remaining.
BUFFER ("*GREP*" "STDERR.txt"), 4 handle(s)
remaining.
I probably won't have time to fix it for 21.2.
Best regards,
Adrian