Skip to content

fix(os/gproc): skip unix-only pid mapping folders on windows - #4956

Merged
hailaz merged 1 commit into
gogf:masterfrom
b84330808:fix/gproc-windows-comm-folder
Nov 5, 2026
Merged

hailaz merged 1 commit into
gogf:masterfrom
b84330808:fix/gproc-windows-comm-folder

Conversation

@b84330808

Copy link
Copy Markdown
Contributor

Fixes #4136

gproc keeps its pid to port mapping files in the first writable folder of /var/tmp, /var/run, ~/.config and the temp folder. On Windows /var/tmp is a drive-relative path, so gproc.Send/gproc.Receive created C:\var\tmp\gf_pid_port_mapping in the root of the current drive.

This keeps /var/tmp and /var/run for Unix-like systems only. On Windows the existing next candidates are used (%USERPROFILE%\.config\gf_pid_port_mapping, then the temp folder); sender and receiver still agree because they use the same list.

Test_getCommPidFolderPath_NotInDriveRootOnWindows fails on master on Windows. Since CI runs on Linux, Test_getCommPidSystemFolderPaths checks the folder list on every platform.

I used Claude Code to write this change.

gproc stores its pid to port mapping files in the first writable folder
of "/var/tmp", "/var/run", "~/.config" and the temp folder. On Windows
the first two resolve to the root of the current drive, so Send/Receive
created "C:\var\tmp\gf_pid_port_mapping". Only try them on Unix-like
systems.

Fixes gogf#4136

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@gqcn gqcn added the bot-approved Approved by gf-pr-review label Nov 2, 2026
@hailaz
hailaz merged commit fca11e9 into gogf:master Nov 5, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-approved Approved by gf-pr-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

os/gogf/gf: temporary path problem on windows system

3 participants