lkml.org 
[lkml]   [2006]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Maximum number of processes in Linux
linux-os (Dick Johnson) wrote:
> Yep....
>
> #include <stdio.h>
> #include <signal.h>
> int main()
> {
> unsigned long i;
> for(i = 0; ; i++)
> {
> switch(fork())
> {
> case 0: // kid
> pause();
> break;
> case -1: // Failed
> printf("%lu\n", i);
> kill(0, SIGTERM);
> exit(0);
> default:
> break;
> }
> }
> return 0;
> }
>
> Shows a consistent 6140.
>
Doesn't work here. Without ulimit, I wasn't surprised
about the resulting OOM mess.

Problem was, it never stopped. I expected OOM to kill
this program, and quite possibly lots of other running programs
as well. What I got, was ever-rolling OOM messages
with stack traces inbetween.
2.6.18-rc4-mm1 never recovered and had to be killed by sysrq.

Helge Hafting



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-16 12:07    [W:0.104 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site