[Pidgin] #7700: Zephyr with tzc can crash pidgin

Pidgin trac at pidgin.im
Fri Dec 5 13:40:59 EST 2008


#7700: Zephyr with tzc can crash pidgin
--------------------+-------------------------------------------------------
 Reporter:  mterry  |        Owner:  seanegan
     Type:  patch   |       Status:  new     
Milestone:          |    Component:  Zephyr  
  Version:  2.4.3   |   Resolution:          
 Keywords:          |  
--------------------+-------------------------------------------------------

Comment(by mterry):

 I just updated the attachment to fix the select() delay.

 There were two issues, depending on which side of the race condition won.
 If tzc ended before pidgin got to select(), select() would never return
 (the first select, that doesn't have a timeout).  Even if pidgin did get
 there first, it would still wait ten seconds on the second select().  You
 can trigger one or the other by inserting a sleep on either side of the
 fork.

 The second issue was easy to fix by just saving the return value of the
 first select().  Fixing the eternal-wait race condition was trickier.  I
 used waitpid with the WNOHANG flag to see if tzc was still up.  There is
 probably a cleaner way, by closing the right fd or something.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/7700#comment:2>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list