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

stdio fd detection on windows #21012

Closed
littledivy opened this issue Oct 29, 2023 · 0 comments · Fixed by #20892
Closed

stdio fd detection on windows #21012

littledivy opened this issue Oct 29, 2023 · 0 comments · Fixed by #20892
Assignees
Labels
bug Something isn't working correctly node compat

Comments

@littledivy
Copy link
Member

The current implementation does the following on Windows:

  • Check if fd is a tty.
  • lstat(fd)
  • If fd.birthtime is 2339-01-01T00:00:00.000Z, fd is a PIPE

It hangs on step 2 for piped stdio because lstat uses GetFileInformationByHandleEx which only works for files and hangs on pipes.

The implementation should use win32 fileapi.h's GetFileType.

@littledivy littledivy self-assigned this Oct 29, 2023
@littledivy littledivy added bug Something isn't working correctly node compat labels Oct 29, 2023
littledivy added a commit that referenced this issue Oct 30, 2023
Fixes #21012
Closes #20855
Fixes #20890
Fixes #20611
Fixes #20336
Fixes `create-svelte` from #17248

Fixes more reports here:
- #6529 (comment)
- #6529 (comment)
- #6529 (comment)
bartlomieju pushed a commit to bartlomieju/deno that referenced this issue Oct 30, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant