Nп/п : 50 из 100
 От   : Kenny McCormack                     2:5075/128        29 авг 23 14:13:37
 К    : All                                                   29 авг 23 17:15:02
 Тема : getrlimit RLMIT_NPROC
----------------------------------------------------------------------------------
                                                                                 
@MSGID: 1@news.xmission.com>
0477845f
@REPLYADDR Kenny McCormack
<gazelle@shell.xmission.com>
@REPLYTO 2:5075/128 Kenny McCormack
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID:
1@news.xmission.com>
@TZUTC: -0000
@TID: FIDOGATE-5.12-ge4e8b94
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;
}
-+- Cut Here ---

When run on system A (Ubuntu - x64), the output is:

    Result: 0
    cur = 31411, max = 31411
    RLIM_INFINITY = -1

What the heck is 31411???


When run on system B (Raspberry PiOS - ARM32), the output is:

    Result: 0
    cur = 6807, max = 6807
    RLIM_INFINITY = -1

What the heck is 6807???

Neither of these results seem reasonable or tied to anything.

What is going on?

-- 
Kenny, I`ll ask you to stop using quotes of mine as taglines.

    - Rick C Hodgin -

--- trn 4.0-test77 (Sep 1, 2010)
 * Origin: The official candy of the new Millennium (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



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх