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

telldir/seekdir do not work #8526

Closed
sbc100 opened this issue Apr 30, 2019 · 0 comments · Fixed by #8540
Closed

telldir/seekdir do not work #8526

sbc100 opened this issue Apr 30, 2019 · 0 comments · Fixed by #8540

Comments

@sbc100
Copy link
Collaborator

sbc100 commented Apr 30, 2019

As far as I can tell we implement the getdents syscall (__syscall220 in library_syscall.js) but telldir always returns zero (since stream.position is always zero) and seekdir does nothing (since lseek doesn't seem to effect getdents as it should.

sbc100 added a commit that referenced this issue Apr 30, 2019
This test was using telldir() to get the offset of the second directory
entry but then asserting that seekdir() rewound back to the first
entry.

Unfortunately when fixing this test it revealed that these function
don't currently work under emscripten.   In fact telldir() always
returns currently under emscripten and seekdir always rewinds to the
beginning.

See #8526
sbc100 added a commit that referenced this issue May 1, 2019
This test was using telldir() to get the offset of the second directory
entry but then asserting that seekdir() rewound back to the first
entry.

Unfortunately when fixing this test it revealed that these function
don't currently work under emscripten.   In fact telldir() always
returns currently under emscripten and seekdir always rewinds to the
beginning.

See #8526
rianhunter added a commit to rianhunter/emscripten that referenced this issue May 2, 2019
Directory seeking was broken, this change makes syscall220() respect
the current directory offset.

Fixes emscripten-core#8526
VirtualTim pushed a commit to VirtualTim/emscripten that referenced this issue May 21, 2019
This test was using telldir() to get the offset of the second directory
entry but then asserting that seekdir() rewound back to the first
entry.

Unfortunately when fixing this test it revealed that these function
don't currently work under emscripten.   In fact telldir() always
returns currently under emscripten and seekdir always rewinds to the
beginning.

See emscripten-core#8526
belraquib pushed a commit to belraquib/emscripten that referenced this issue Dec 23, 2020
This test was using telldir() to get the offset of the second directory
entry but then asserting that seekdir() rewound back to the first
entry.

Unfortunately when fixing this test it revealed that these function
don't currently work under emscripten.   In fact telldir() always
returns currently under emscripten and seekdir always rewinds to the
beginning.

See emscripten-core#8526
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

Successfully merging a pull request may close this issue.

1 participant