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

syscall.Dup2 is unsupported #21

Open
liavOpti opened this issue Jan 20, 2025 · 3 comments
Open

syscall.Dup2 is unsupported #21

liavOpti opened this issue Jan 20, 2025 · 3 comments
Assignees

Comments

@liavOpti
Copy link

Hey!

I noticed that in the file gopjrt/pjrt/dynamiclib.go, the dup2 syscall is being used. Unfortunately, my system (Ubuntu 24.04.1 LTS, arm64 architecture) does not support dup2, and this is causing issues.

Could you please update the code to use dup3 instead? Alternatively, using close() followed by dup() would also work as a solution.

Let me know if you need further details or assistance with this!

Thanks!

@janpfeifer
Copy link
Contributor

Thanks for reporting @liavOpti , this seems a simple enough fix. Let me check it.

@janpfeifer janpfeifer self-assigned this Jan 20, 2025
janpfeifer added a commit that referenced this issue Jan 20, 2025
@janpfeifer
Copy link
Contributor

I used dup3 just in the very odd case someone closed fd 0 or 1, in which case close+dup would duplicate to the wrong fd number -- I assume it picks up the first one free.

Btw, just below I use syscall.Dup, that is available in Arm64, right ?

Pls, let me know if it works. With so many offerings with Arm64 these days (even Nvidia is launching a AI Desktop arm64 based) it would be very neat to add support for it.

janpfeifer added a commit that referenced this issue Jan 20, 2025
@janpfeifer
Copy link
Contributor

It should be in head in main branch. Let me know if you need an immediate release, or if you can work with head from github. I usually wait for more changes before cutting a release, but if you need it, I'll make it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants