Bug 11791 - ulimit -H/-S flags are positional
Summary: ulimit -H/-S flags are positional
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.30.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-23 10:23 UTC by Sebastiaan van Stijn
Modified: 2019-04-27 19:02 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastiaan van Stijn 2019-04-23 10:23:29 UTC
When specifying the `-S` / `-H` flag _after_ the `-a` flag, the flag is ignored:

busybox sh -c 'ulimit -a -S | grep stack && ulimit -a -H | grep stack'
-s: stack size (kb)                8192
-s: stack size (kb)                8192

busybox sh -c 'ulimit -aS | grep stack && ulimit -aH | grep stack'
-s: stack size (kb)                8192
-s: stack size (kb)                8192


Changing the order to put the `-S` / `-H` _before_ `-a`, and the correct values are shown;


busybox sh -c 'ulimit -S -a | grep stack && ulimit -H -a | grep stack'
-s: stack size (kb)                8192
-s: stack size (kb)                unlimited

busybox sh -c 'ulimit -Sa | grep stack && ulimit -Ha | grep stack'
-s: stack size (kb)                8192
-s: stack size (kb)                unlimited
Comment 1 Denys Vlasenko 2019-04-27 19:02:37 UTC
Fixed in git.