Skip to content

[bug] cd updates shell PWD but external children keep the stale process cwd (cd dir && ls lists the OLD dir) #423

Closed

Description

@caomengxuan666

Found by wt52/pb10k during interactive rendering work (2026-10-03).

Repro (piped interactive):

printf 'cd /d/repo/rubash/target/issue-suites/results/pb10k/pty-sandbox\nls\n' | target/debug/rubash.exe -i

ls lists the OLD directory although the shell's PWD updated (pwd shows the new dir). External children are spawned with a stale cwd — suspect child spawn resolves cwd from a cached value rather than the live process cwd (executor spawn path; compare GNU execute_cmd.c child setup).

Artifacts: target/issue-suites/results/pb10k/ probes (rubrc2.sh). Also reproducible in rcfile contexts. Not yet minimized to non-interactive form — the interactive reader path is confirmed.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:pathbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions