GNU bug report logs -
#51177
29.0.50; stop-process on pipes
Previous Next
Full log
Message #41 received at 51177 <at> debbugs.gnu.org (full text, mbox):
I have another problem with stopped output. In this example:
;;; -*- lexical-binding:t -*-
(ert-deftest test-read-after-exit ()
(let* ((output "")
(filter (lambda (p s) (setq output (concat output s))))
(sentinel (lambda (p _)
(set-process-filter p filter)
(while (accept-process-output p 0))))
(proc (make-process :command '("printf" "foo")
:name "test-proc"
:filter t
:sentinel sentinel
:connection-type 'pipe)))
(while (process-live-p proc)
(accept-process-output proc 0.2))
(set-process-filter proc filter)
(while (accept-process-output proc 0))
(should (equal output "foo"))))
the filter function is never called.
We could say that reading the process's output after the process has
terminated is an unreasonable request. However, I would like to propose
that, in status_notify, the sentinel function should be called before
closing the file descriptors. That way, the sentinel can read the
buffered output as suggested in the example.
Helmut
This bug report was last modified 3 years and 312 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.