----------------------------------------------------------------------------------
@MSGID: <20230829113025.50@kylheku.com> d8cc20c5
@REPLY: 1@news.xmission.com>
0477845f
@REPLYADDR Kaz Kylheku <864-117-4973@kylheku.com>
@REPLYTO 2:5075/128 Kaz Kylheku
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID: <20230829113025.50@kylheku.com>
@RFC-References:
1@news.xmission.com>
@TZUTC: -0000
@PID: slrn/pre1.0.4-9 (Linux)
@TID: FIDOGATE-5.12-ge4e8b94
On 2023-08-29, Kenny McCormack <
gazelle@shell.xmission.com> wrote:
> I have the following C program:
>
> --- Cut Here ---
> #include
> #include
> #include
>
> int main(void)
> {
> struct rlimit rlim;
> printf("Result: %d
",getrlimit(RLIMIT_NPROC, &rlim));
> printf("cur = %lu, max = %lu
",rlim.rlim_cur,rlim.rlim_max);
> printf("RLIM_INFINITY = %ld
",RLIM_INFINITY);
> return 0;
> }
That`s a waste of time; the existing "ulimit" tool reads these
limits. "ulimit -a" gives you all of them; "ulimit -u" gives
us that one ([u]ser processes).
> What the heck is 31411???
>
> What the heck is 6807???
Pre-release version of Motrola 6809? ;)
Good question; do these valuas come from some boot scripts on that
system, or are they in the kernel?
Ubuntu 18, 32 bit:
$ ulimit -u
15791
Indeed, weird numbers; it`s as if they are concocted by some formula
applied to various other system parameters.
I think you have to hunt down the kernel code where the initial/default
values are prepared.
It could be the work of a boot script, or ... dare I utter it ... systemd.
--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
--- slrn/pre1.0.4-9 (Linux)
* Origin: A noiseless patient Spider (2:5075/128)
SEEN-BY: 5001/100 5005/49 5010/352 5015/255 5019/40
5020/715 848 1042 4441
SEEN-BY: 5020/12000 5030/49 1081 5075/128
@PATH: 5075/128 5020/1042 4441