ash ulimit problem
thomas
thomas at hax.se
Fri Dec 16 05:37:34 UTC 2016
Did you not see my answer from last Friday?
You are not using the command correctly.
---
Your problem is that the commands you use to change the value starts a new shell, changes the value in the new shell, then that shell exits. The "ulimit" command only affects the current and child shells, not the parents.
If you want to change the value permanent you can add the following line to /etc/profile or ~/.profile:
---
ulimit -c 1024
---
Example:
---
root at ROOter-Uppsala:~# ulimit -c
0
root at ROOter-Uppsala:~# busybox sh -c 'ulimit -c 1024'
!! This starts a new shell, changes the ulimit value in that shell, then it exits and you are back with your first shell
root at ROOter-Uppsala:~# ulimit -c
0
!! no change
root at ROOter-Uppsala:~# ulimit -c 1024
!! "ulimit" is a shell built in command, so this changes the value in
!! the current shell
root at ROOter-Uppsala:~# ulimit -c
1024
---
> 16 dec. 2016 kl. 04:50 skrev lukgeeker(lulu) <305248199 at qq.com>:
>
> dear busybox:
>
> busybox version is v1.23.2
>
> The following command is not valid :
> 1,busybox sh -c 'ulimit -c 1024 true'
> 2,busybox sh -c 'ulimit -c 1024'
>
> Result:
>
>
> [root at lukgeeker]# busybox ash -c 'ulimit -a'
>
> -c: core file size (blocks) 0
>
> why?
> thk!!!
> !DSPAM:585364ab840485765980!
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>
> !DSPAM:585364ab840485765980!
More information about the busybox
mailing list