PDA

View Full Version : iTCL


b>d>>s
11-10-2003, 11:10 PM
disappearing/swapping vars between scripts ?
open/file commands losing handles?

just curious cos i get some odd errors on very plain code

or not being able to open 0 byte files.


--------------------------- ErrorInfo ----------------------------
couldn't open "C:/0Day/1109/ACTUALTES....GT/.ioFTPD.badaazz.lock": no such file or directory
while executing
"open $ppath2/.ioFTPD.badaazz.lock w"
("while" body line 3)
invoked from within
"while {1} {
if {![file exists $ppath2/.ioFTPD.badaazz

darkone
11-11-2003, 12:03 AM
CreateFile() api that those commands are using, may give odd results under race conditions..

b>d>>s
11-11-2003, 12:17 AM
tits.

any suggestions ? :'(

catch {} error, check :? etc.

darkone
11-11-2003, 12:29 AM
Wait until next version.. it'll provide you a fancy locking api (if I remember to implement it :))

You can expect it to work as following:

lock -wait "lockname" <timeout/milliseconds>
lock -release "lockname"

lock will return 0 on success, 1 on timeout & tcl error on system error.

b>d>>s
11-11-2003, 12:33 AM
oook, sweet. :)

many thanks.