Bug 11791

Summary: ulimit -H/-S flags are positional
Product: Busybox Reporter: Sebastiaan van Stijn <thajeztah>
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.30.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

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.