Repository navigation
fix(shell): source --rcfile once in interactive shells (#312) - #712
Merged
Merged
Conversation
run_startup_files sourced --rcfile, then each driver's direct run_init_file call sourced it again: --rcfile gate.sh -i ran the file twice. run_startup_files records the sourced override in __RUBASH_SOURCED_RC; the four direct calls skip it then, keeping the leftover shapes (empty HOME, non-interactive extension). #297 exit semantics unchanged. issue312 file 9/9 (was 6/9); 297 file 10/10; lib 596/596.
Member
Author
|
Self-review pass (no approval): Verified from the diff. One file ( Two observations, both non-blocking:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(shell): source --rcfile once in interactive shells (#312)
What
rubash --rcfile gate.sh -i < /dev/nullran gate.sh TWICE (appendprobe: 2 lines); GNU sources once.
run_startup_filessourced theoverride, then each driver's direct
run_init_filecall sourced itagain. (The non-interactive
--rcfile x -csourcing is a deliberaterubash extension — GNU ignores it there — and is preserved.)
Fix
run_startup_filesrecords the sourced override in__RUBASH_SOURCED_RC; all four drivers' direct calls skip it then(via
init_file_needs_direct_run). Leftover shapes keep the directcall: empty-HOME early return, non-interactive extension, login.
#297exit-in-rc semantics unchanged (verifiedA, rc 7, noXC).GNU:
shell.c:722 run_startup_files.Verification
issue312file 6/9 → 9/9.issue297_30010/10; lib 596/596.except the fixed file itself (9/0 vs 6/3). Zero NEW tests; the 2
DISAPPEARED are fixed tests. (The tool's cli_tests/issue297_300
NEW-target rows are the known parse artifact — per-target rows are
byte-identical.) No regression.
6295367, only rubash[patch]switched): 9 vs 8, the single extra is the known
epochrealtimeload flake (extensively proven both directions).