Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-09-20
21:12 • Closed ticket [1029907fff]: differences win32 vs unix plus 6 other changes artifact: 3d428aba89 user: aotto1968
2004-09-17
14:52 • New ticket [1029907fff]. artifact: 1a455db901 user: aotto1968

differences win32 vs unix

Closed1029907fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-09-17 14:52:28
Hi, 
 
  my environment >>>>>>>>>>>>>>>>>> 
UNIX:Linux linux02 2.4.21-243-athlon #1 Thu Aug 12 
15:24:15 UTC 2004 i686 athlon i386 GNU/Linux 
WINDOWS: win xp 
 
 my problem >>>>>>>>>>>>>>>>>>>>> 
a tcl 'C' extension register with 'Tcl_CreateEventSource' 
a 'setupProc' and a 'checkProc' to handel my own events 
-> ok 
the event-source are winsock2 file-handels fully under 
control of my extension and not known outside of my 
application 
 
during the execution of my extension I cal 
'Tcl_DoOneEvent(TCL_ALL_EVENTS)' to start the eventloop 
and wait for new events -> ok 
 
now the differences>>>>>>>>>>>>>>>>>> 
UNIX: after calling 'Tcl_DoOneEvent' the 'setupProc'  and 
the 'checkProc'  of my own events are called and 
everything went well -> ok 
 
WINDOWS: after calling 'Tcl_DoOneEvent' neither 
'setupProc' ar 'checkProc' was called  -> error  
the appication seems to blocking 
 
to solve the proble I have to call 
'Tcl_DoOneEvent(TCL_ALL_EVENTS|TCL_DONT_WAIT)'  
and call the 'setupProc' and the 'checkProc' by my own -> 
bad 
 
now the mystic >>>>>>>>>>>>>>>>>>>>>>> 
if I add... 
proc Ping {} { 
    after 1000 Ping 
    puts ping 
} 
Ping 
and do not provide 'TCL_DONT_WAIT' 
both 'setupProc'  and the 'checkProc' are called and 
everything works well -> mystic 
 
solution >>>>>>>>>>>>>>>>>>>>>>>>>> 
1: on windows 'Tcl_CreateEventSource' does !!NOT!! really 
add an event source 
2: you need 'start' or 'activate' the event-processing by 
using a USELESS timer-event  
 
mfg 
 
  aotto
aotto1968plain2004-09-20 21:12:54
Logged In: YES 
user_id=1030114

the BUG was the guy sitting in front of the computer ;-( 
the reason was that 'Tcl_CreateEventSource' was not available at the  
tine the bug has happen. The bug only happen for TCP-Network 
communication which was !!NOT!! tested for UNIX in my environment 
(e.g. ToDo for me) 
 
mfg 
 
  aotto
Log in (anonymous is fine) to add a comment.