Skip to content

Fix Process changing GAP's directory on Cygwin - #6776

Open
fingolfin wants to merge 1 commit into
masterfrom
mh-claude/cygwin-process-cwd
Open

fingolfin wants to merge 1 commit into
masterfrom
mh-claude/cygwin-process-cwd

Conversation

@fingolfin

Copy link
Copy Markdown
Member

spawnve cannot set the child's working directory, so the Cygwin variant of SyExecuteProcess changes GAP's own, and never back: every Process or RunProcess call with a directory leaves GAP there.

Change the directory only around spawnve and restore it afterwards, keeping errno from chdir or spawnve for the caller. Doing both after the descriptor setup leaves no early return between them.

Assisted-by: Generative AI

@fingolfin fingolfin added kind: bug Issues describing general bugs, and PRs fixing them os: windows Issues and PRs that are (at least partially) specific to Windows topic: kernel release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes labels Oct 19, 2026
@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.68%. Comparing base (06ae44c) to head (29d7f04).

Files with missing lines Patch % Lines
src/iostream.c 70.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6776   +/-   ##
=======================================
  Coverage   79.68%   79.68%           
=======================================
  Files         684      684           
  Lines      295461   295472   +11     
  Branches     8656     8657    +1     
=======================================
+ Hits       235427   235439   +12     
+ Misses      58206    58205    -1     
  Partials     1828     1828           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

spawnve cannot set the child's working directory, so the Cygwin
variant of SyExecuteProcess changes GAP's own, and never back: every
`Process` or `RunProcess` call with a directory leaves GAP there.

Change the directory only around spawnve and restore it afterwards,
keeping errno from chdir or spawnve for the caller. Doing both after
the descriptor setup leaves no early return between them.

Assisted-by: Generative AI
@fingolfin
fingolfin force-pushed the mh-claude/cygwin-process-cwd branch from ec0f580 to 29d7f04 Compare October 19, 2026 11:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind: bug Issues describing general bugs, and PRs fixing them os: windows Issues and PRs that are (at least partially) specific to Windows release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes topic: kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants