[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33839: 26.1.90; Emacs occasionally fails to receive asynchronous sub
bug#33839: 26.1.90; Emacs occasionally fails to receive asynchronous subprocess output in batch mode
Sun, 23 Dec 2018 17:21:58 +0200
> From: Philipp <address@hidden>
> Date: Sun, 23 Dec 2018 03:28:53 +0100
> (let ((proc (make-process :name "test"
> :command '("bash" "-c" "echo stdout; echo stderr
> :buffer (current-buffer)
> :connection-type 'pipe
> :sentinel #'ignore
> :noquery t
> :coding '(utf-8-unix . utf-8-unix))))
> (when (process-live-p proc)
> (process-send-eof proc))
> (while (process-live-p proc)
> (accept-process-output proc))
> (cl-assert (equal (buffer-string) "stdout\nstderr\n") :show-args)))
> Then evaluate this form repeatedly. Occasionally the buffer is empty
> and the assertion triggers.
Isn't there an inherent race condition here?
bug#33839: 26.1.90; Emacs occasionally fails to receive asynchronous subprocess output in batch mode, Paul Eggert, 2018/12/27