Hello, about your new suggestion:
1) like I said, now I can open the fd in: /proc/self/fd/ e.g.: hFile = Open "/proc/self/fd/20" For read watch some fd (like 3,4,5,6, 16 and 20) gives data, others not. So, I don't understand what's the use of the trick. 2) how have I to use it ? maybe: hFile = Open "/proc/self/fd/.1" For read watch 3) I use Gambas 3, where can I download the revision #4134 ? Thanks Paolo P.S.: Benoît ! Is not it better if you add that possibility to personalize the message loop ??? > I may have a solution for you. > > In revision #4134, I added a trick for opening existing > file descriptors, so > that you can watch them. > > The trick is the following: use ".XXX" as file name, where > XXX is the file > descriptor number. > > This trick only works if: > - You use the FOR READ/WRITE syntax. > - You don't use FOR CREATE/APPEND. > - XXX is a valid file descriptor. > - XXX has been opened for reading if you use FOR READ, and > for writing if you > use FOR WRITE. > > You can close the file, it will not close the file > descriptor. But it will > stop the watching operations. > > For example: > > hFile = Open ".1" For Write > Print #hFile, "hello "; > Close #hFile > Print "world!" > > Tell me if it works for you. > > Regards, > > -- > Benoît Minisini > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San > Francisco, CA > http://p.sf.net/sfu/rim-devcon-copy2 > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA http://p.sf.net/sfu/rim-devcon-copy2 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user