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
Wrapper applets eat the wrapped command's options: stdbuf -oL ls -l and time ls -l fail with 'invalid option -- l', runcon misreads it as its own missing argument; chroot/runcon option errors exit 1 instead of GNU's 125 #1375
Probe-verified residuals of audit item O5 (same-source mingw+Wine harness, two runs, GNU coreutils 9.4). The "wrapper" applets — commands whose operands include a whole command line — do not stop their own option parsing at the wrapped command, and their usage-error exit codes ignore the coreutils 125 convention. (env's stop-policy is already #1353 and timeout's missing -s/-k flags are #1359/#1355 territory; the faces below are the unfiled remainder.)
stdbuf eats the wrapped command's options.stdbuf -oL ls -l → WinuxCmd: stdbuf: invalid option -- 'l', exit 125, nothing runs. GNU runs ls -l. (The attached-value form stdbuf -e0 ... happens to work; a separate-token option of the wrapped command does not.)
time eats the wrapped command's options.time ls -l → WinuxCmd: time: invalid option -- 'l', exit 1. GNU runs ls -l and reports timings.
runcon eats the wrapped command's options.runcon ctx ./ls.exe -l → WinuxCmd: runcon: option requires an argument -- 'l' — it claims runcon's own option -l is missing its argument; the wrapped command never runs.
Exit codes.chroot --zzz root → WinuxCmd exit 1; GNU exit 125. runcon --zzz ctx ... → WinuxCmd exit 1; GNU exit 125. (Missing-operand chroot with no arguments does exit 125 on both — the mapping exists but is not applied to option errors.)
Expected (GNU)
Once the wrapped command starts, its argv passes through untouched (coreutils' stop-at-first-nonoption / -- discipline per tool), and usage errors in this applet family exit 125.
Source
src/core/command_context.cppm: stop_options_after_positionals-style policy is missing or not applied for stdbuf/time/runcon; the exit-status mapping used by these applets defaults option errors to 1 instead of EXIT_USAGE (125).
Regression seed
In-repo tests named with this issue number: the four probes above, asserting the wrapped command actually runs (faces 1–3) and exit code 125 (face 4).
Activity
fix(runcon): stop option parsing at first positional (#1375)