Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method to convert a file descriptor to a filehandle #5180

Open
p6rt opened this issue Mar 16, 2016 · 1 comment
Open

Method to convert a file descriptor to a filehandle #5180

p6rt opened this issue Mar 16, 2016 · 1 comment
Labels
RFC Request For Comments

Comments

@p6rt
Copy link

p6rt commented Mar 16, 2016

Migrated from rt.perl.org#127725 (status was 'new')

Searchable as RT127725$

@p6rt
Copy link
Author

p6rt commented Mar 16, 2016

From daryl@azry.net

Hi!

I would appreciate if an IO​::Handle class could be created from a file descriptor.
From what i saw, the "native-descriptor" method from IO​::Handle can do the reverse operation.
This last method is handled by nqp, which in turn gets it from moarvm (it is call "fileno_fh" in moar).
Most of the work would probably be done in moarvm.

This kind of work would help design proper IO​::Handles -inherited classes when one only gets a file descriptor as an input.

Exemple :
IO​::Pty would be constructed via the posix_openpt method. This method only returns a file descriptor.

Thank you!
Azry

@p6rt p6rt added the RFC Request For Comments label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request For Comments
Projects
None yet
Development

No branches or pull requests

1 participant