Fix Windows crash: guard POSIX dup() call in app() #12

Merged
kahliburke merged 1 commit from fix/11-windows-dup-ccall into main 2026-03-16 16:56:02 -07:00
kahliburke commented 2026-03-12 08:47:45 -07:00 (Migrated from github.com)

Summary

  • Guard the ccall(:dup, ...) in app() with @static if Sys.iswindows(), falling back to stdin directly
  • dup is POSIX-only and crashes immediately on Windows with "could not load symbol"
  • The dup is only needed to preserve the real terminal fd before REPLWidget redirects stdin, but REPLWidget requires PTY and can't run on Windows anyway

Test plan

  • All 4085 tests pass on macOS/Linux
  • Verify demos launch on Windows 11 + Julia 1.12.5

Fixes #11

## Summary - Guard the `ccall(:dup, ...)` in `app()` with `@static if Sys.iswindows()`, falling back to `stdin` directly - `dup` is POSIX-only and crashes immediately on Windows with "could not load symbol" - The `dup` is only needed to preserve the real terminal fd before REPLWidget redirects stdin, but REPLWidget requires PTY and can't run on Windows anyway ## Test plan - [x] All 4085 tests pass on macOS/Linux - [ ] Verify demos launch on Windows 11 + Julia 1.12.5 Fixes #11
devel-chm commented 2026-03-16 13:25:40 -07:00 (Migrated from github.com)

Just tested this with the Life app on Julia 1.10.11 for win11.
Seems to work ok. (Any reason why the squares in the Life cells
are not ... square?)

Just tested this with the Life app on Julia 1.10.11 for win11. Seems to work ok. (Any reason why the squares in the Life cells are not ... square?)
kahliburke commented 2026-03-16 17:03:42 -07:00 (Migrated from github.com)

@devel-chm Thanks for testing ... generally things are built out of terminal characters which are not square. The pixel graphic support with Sixel and kitty allow you to skirt around this. Here's what I see when I run it:

image
@devel-chm Thanks for testing ... generally things are built out of terminal characters which are not square. The pixel graphic support with Sixel and kitty allow you to skirt around this. Here's what I see when I run it: <img width="647" height="457" alt="image" src="https://github.com/user-attachments/assets/a2cf9eff-6617-424d-b6bb-2392a126929a" />
devel-chm commented 2026-03-18 05:45:15 -07:00 (Migrated from github.com)

I was able to install version 1.1.3 on julia 1.10.11 with windows11 and I was able to figure out how
to access the demos and run the launch. Thats progress, thanks!

I was able to install version 1.1.3 on julia 1.10.11 with windows11 and I was able to figure out how to access the demos and run the launch. Thats progress, thanks!
Sign in to join this conversation.
No description provided.