Folks,
    Are 'fileevent' procs called on an interrupt thread or something that would cause 
them to be run recursively or to be re-entered?  Can someone who KNOWS please explain 
this to me?

THE SITUATION
    I launched a background program with 
 
                                  set fd [ open "|$cmd" ] 

                                  fileevent $fd readable myEventProc

and connected a fileevent proc to the fd.  For debugging, I have a 'puts $logfile...' 
as line 1 in the event handler.  The background program is C++ and uses 

                                 cout << "GUIMSG{...}" << endl << flush; 

to write messages targeted for the event proc.

THE PROBLEM
    The logfile shows hundreds of "eventproc ENTER" entries without any signs that the 
proc ran more than the first line.  After a while, the log shows that we are 
processing records in the order written by the program.  However, all log entries show

                                eventproc -- ... processing
                                eventproc -- LEAVE

without any ENTER records.  Eventually, the program goes to sleep and we get no more 
file events and the TCL app stalls too.  We've even seen the processing run in reverse 
order to that with which the records were written.

WHAT IS GOING ON HERE?????

BTW:  If there is a better list to use to send this sort of question, please let me 
know.  Don't suggest net news -- I'm interested in answers not SPAM or FLAMES.  If 
I've really screwed something up, I won't be offended if you tell me what I did wrong 
and how to fix it.

--- Dan 
0;-D====================================================================================
  "In a dragon fight, often times, the bleachers get scorched."
  ... let The GRILLON Group help you slay your dragons.  Call Today.
====================================================================================
    Daniel M. St.Andre'                         The GRILLON Group
    voice:  512.331.8271                        Information Management Consultants
    fax:    512.331.8915                        10511 Weller Drive
    ofc email:   [EMAIL PROTECTED]          Austin, TX 78750  USA
====================================================================================

Reply via email to