Skip to content

mkfifo: allow negative values for -m/--mode - #16017

Merged
sylvestre merged 3 commits into
uutils:mainfrom
Logic769:mkfifo-allow-negative-mode
Nov 4, 2026
Merged

sylvestre merged 3 commits into
uutils:mainfrom
Logic769:mkfifo-allow-negative-mode

Conversation

@Logic769

Copy link
Copy Markdown
Contributor

Problem

mkfifo -m -1 fifo is rejected by the argument parser because -1 is treated as another option, whereas GNU mkfifo accepts a negative numeric mode.

Change

Set .allow_hyphen_values(true) on the -m/--mode argument so that values like -1 are parsed as the mode value instead of a flag.

Tests

Added test_mode_negative_value in tests/by-util/test_mkfifo.rs, which checks that the FIFO is created.

Closes #16000

@Logic769
Logic769 force-pushed the mkfifo-allow-negative-mode branch from 11f78a9 to 063c060 Compare October 30, 2026 13:03
Comment thread tests/by-util/test_mkfifo.rs Resolved
Comment thread tests/by-util/test_mkfifo.rs Resolved
@Logic769

Copy link
Copy Markdown
Contributor Author

Switched the test to -066 and asserted prw-------. -1 only produces 0666, which is the default anyway, so it never proved the negative mode was applied.

@Logic769
Logic769 force-pushed the mkfifo-allow-negative-mode branch from e7556f4 to 90602bf Compare November 2, 2026 01:02
Comment thread tests/by-util/test_mkfifo.rs Resolved
Comment thread tests/by-util/test_mkfifo.rs Resolved
@Logic769
Logic769 force-pushed the mkfifo-allow-negative-mode branch 2 times, most recently from 1e5af24 to ae176da Compare November 2, 2026 14:15
@sylvestre

Copy link
Copy Markdown
Contributor

a bunch of jobs are failing

@Logic769
Logic769 force-pushed the mkfifo-allow-negative-mode branch from 781bc24 to f0ceee6 Compare November 3, 2026 15:43
@sylvestre
sylvestre merged commit 663e2c9 into uutils:main Nov 4, 2026
97 checks passed
@sylvestre

Copy link
Copy Markdown
Contributor

Thanks for your PR

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mkfifo: -m -1 is rejected by the argument parser

2 participants