Any to get the file descriptors from io library ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Any to get the file descriptors from io library ?

Laurent FAILLIE
Hello,

I wrote an hybrid application in C and Lua and I would like to poll() from C side file descriptors used by Lua's IO library. But how can I retrieve this FD ?

Thanks

Laurent
 
---
The misspelling master is on the Web.
  _________ 100 % Dictionnary Free !
/                    /(
/ Dico          / / Pleins d'autres fautes sur
/________ / /
(########( / http://destroyedlolo.info
Quoi, des fautes d'orthographe! Pas possible ;-D.
Reply | Threaded
Open this post in threaded view
|

Re: Any to get the file descriptors from io library ?

Tom N Harris-2
On Tuesday, July 07, 2015 01:27:59 PM Laurent FAILLIE wrote:
> Hello,
> I wrote an hybrid application in C and Lua and I would like to poll() from C
> side file descriptors used by Lua's IO library. But how can I retrieve this
> FD ?
>

Since 5.2, luaL_Stream. In 5.1 the userdata just boxed a FILE*.

http://www.lua.org/manual/5.3/manual.html#luaL_Stream

--
tom <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: Any to get the file descriptors from io library ?

Laurent FAILLIE
Ok, thanks : I'll try.
 
The misspelling master is on the Web.
  _________ 100 % Dictionnary Free !
/                    /(
/ Dico          / / Pleins d'autres fautes sur
/________ / /
(########( / http://destroyedlolo.info
Quoi, des fautes d'orthographe! Pas possible ;-D.



Le Mardi 7 juillet 2015 18h49, Tom N Harris <[hidden email]> a écrit :


On Tuesday, July 07, 2015 01:27:59 PM Laurent FAILLIE wrote:

> Hello,
> I wrote an hybrid application in C and Lua and I would like to poll() from C
> side file descriptors used by Lua's IO library. But how can I retrieve this
> FD ?

>

Since 5.2, luaL_Stream. In 5.1 the userdata just boxed a FILE*.

http://www.lua.org/manual/5.3/manual.html#luaL_Stream

--
tom <[hidden email]
>