(Reported via email by Patrick J. LoPresti)
Hello, and thank you for vc-clearcase.
I have been examining the source code trying to track down an occasional "hang" I am encountering. The following code in cleartool-wait-for seems incorrect to me:
(with-timeout ((or timeout cleartool-timeout))
(while (< cleartool-ctid tid)
;; will return t if some data was received
(accept-process-output cleartool-process 2 0 t)))
Doesn't the "or" short-circuit? In other words, once you receive some data during one iteration of the "while" loop, "received-some-data" will be t, and then the "or" will prevent accept-process-output from ever being called again (!).
I believe this explains why you need the "mysterious" call to sit-for, and why it helps. (I suspec that sit-for effecitvely calls accept-process-output as a side-effect.)
I am attaching a patch that seems to help.
Log in to post a comment.