Hi, everyone,

 

When I used the flock(f,s) in Unicon,

flock(str_filename,ā€xā€)  is OK, but

 

flock(str_filename,ā€uā€) is not available, the &errortext returned is

 

------------------------------------------------

Run-time error 1044

File try.icn; Line 17

invalid operation to flock/fcntl

offending value: "u"

Traceback:

   main()

   flock(file(try.icn),"u") from line 17 in try.icn

-----------------------------------------------

 

What is wrong when using flock(f,s) ?

 

Lu Song

 

 

My trial code is followed :

~~~~~~~~~~~~~~~~~~~~~~~

procedure main()

  str := "try.icn"

  p:= open(str,"b") | stop(&errortext)

 flock(p,"x")

write("lock file ...")

  while l := read(p) do write(l)

 write(p,"\n\n add info.") ;  delay(1000*40)

  flock(p,"u")

  write("unlocked ... "); delay(1000*60*2)

  close(p)

end

~~~~~~~~~~~~~~~~~~~~~~~~~

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to