#12 ocasional hang while waiting for cleartool

closed-fixed
5
2009-07-15
2009-07-14
No

(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)
(setq received-some-data
(or received-some-data
;; 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.

Cheers!

- Pat

Discussion

  • Alex Harsanyi

    Alex Harsanyi - 2009-07-14

    patch to fix this bug

     
  • Alex Harsanyi

    Alex Harsanyi - 2009-07-14

    This affects all released versions of vc-clearcase.

     
  • Alex Harsanyi

    Alex Harsanyi - 2009-07-14
    • status: open --> open-accepted
     
  • Alex Harsanyi

    Alex Harsanyi - 2009-07-15
    • status: open-accepted --> closed-fixed
     
  • Alex Harsanyi

    Alex Harsanyi - 2009-07-15

    I released vc-clearcase-2.2 (for Emacs22) and vc-clearcase-3.2 (for Emacs 23) to fix this bug

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks