%alarm function not working on D3/Linux

73 views
Skip to first unread message

Nibble

unread,
Feb 18, 2015, 4:33:53 PM2/18/15
to mvd...@googlegroups.com
Hi! 

We have a FlashBasic program that uses a client socket (%socket c function) to send a HTTP POST message to a web server and then read the response. 

We used the %alarm c function to control Timeout but for some reason it isn't working. We use the %alarm(5) instruction so we expect the process to end at 5 seconds but continues. 

We have a UNIX version of D3 (Linux) 

This is a simplified sample code that show the same problem: 

cfunction unix.builtin
%alarm(5)
sleep
60



instead of aborting at 5 seconds it continues to 60 seconds. 

Any clues? 

Thanks in advance! 

Ross Ferris

unread,
Feb 18, 2015, 8:12:51 PM2/18/15
to mvd...@googlegroups.com
ummm .... what happens if you remove the "sleep 60", which looks like a likely candidate for a 60 second sleep to me ...?

fwinans

unread,
Feb 19, 2015, 7:03:30 AM2/19/15
to mvd...@googlegroups.com
You imply that the %alarm()  will generate an ABORT,
but it will in fact do whatever you have listed on the  ALRM  entry of
your TRAP  command in tcl. 

Our    TRAP   command, for example, has the default entry  USERALARM
which refers to  dm,bp,  useralarm

So do  TRAP  and see if you are set up like you thought you were for this
{linux-side  process signal}'s TCL responder.
Reply all
Reply to author
Forward
0 new messages