You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] exec -a is ignored — the child's $0 is not the custom argv[0] #1132
[bug] exec -a is ignored — the child's $0 is not the custom argv[0]
exec -a customargv <this-shell> -c 'echo zero=$0'# GNU bash 5.3.20: zero=customargv# rubash: zero=<the rubash binary's own path># niu: zero=niu
Expected (GNU bash 5.3.20): zero=customargv.
Actual (rubash): the -a argument has no effect at all; the exec'd shell sees its normal $0.
exec -a is the standard way to set a process's presented name (login shells via exec -a -bash, daemon/multicallee dispatch on $0); ignoring it breaks all of those.
Env: rubash master 493ebb2 / niubash 1.4.4 (niu, master 953f513, embeds rubash 493ebb2), Linux x86_64, GNU bash 5.3.20 x86_64-pc-linux-gnu as oracle. Also reproduces in niu (same engine).
Re-verified on master (263ce53f): the #1181 fix (commit 062f6fe) passes argv0 via Command::arg0, which is #[cfg(unix)]-only. On Windows this still reproduces:
Fixed by #1181 (2026-10-22/23 bulk GNU-parity wave): landed as a dedicated commit referencing this issue, covered by the audit differential suite (tests/fixtures/audit/), and re-verified byte-for-byte against a GNU bash 5.3.20 oracle; master CI (ff1a555) runs the suite green.
Closing now to restore the linkage: GitHub's closing-reference parser only honored the first entry of #1181's long Fixes list, so this stayed open after the fix landed. If anything still reproduces on current master, reopen with a transcript and it returns to the fix queue.
Activity
caomengxuan666 commentedon Oct 23, 2026
Re-verified on master (263ce53f): the #1181 fix (commit 062f6fe) passes argv0 via
Command::arg0, which is#[cfg(unix)]-only. On Windows this still reproduces:Keeping open for the Windows side (argv[0] spoofing is possible via the CreateProcess command line, just not through std::process::Command).
caomengxuan666 commentedon Oct 23, 2026
Fixed by #1181 (2026-10-22/23 bulk GNU-parity wave): landed as a dedicated commit referencing this issue, covered by the audit differential suite (tests/fixtures/audit/), and re-verified byte-for-byte against a GNU bash 5.3.20 oracle; master CI (ff1a555) runs the suite green.
Closing now to restore the linkage: GitHub's closing-reference parser only honored the first entry of #1181's long
Fixeslist, so this stayed open after the fix landed. If anything still reproduces on current master, reopen with a transcript and it returns to the fix queue.