Date: Wed, 1 Oct 1997 14:16:10 +0400 From: "Alexander V. Tischenko" <flash@ax.ru> To: <hackers@FreeBSD.ORG> Subject: Re: Recursive fork() and different fbsd's Message-ID: <199710011016.OAA25674@thorin.hway.ru>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. ------=_NextPart_000_01BCCE74.9100ACC0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit I tried a bit modified sample and got right into resource limit. Don't know how you can count proc's with your source. Alexander V. Tischenko ---------- > From: Eugeny Kuzakov <Eugeny.Kuzakov@lab321.ru> > To: hackers@FreeBSD.ORG > Subject: Recursive fork() and different fbsd's > Date: 29 сентября 1997 г. 10:39 > > Hi, All ! > > > I run this program on: > > 1. 3.0-970807-SNAP - no hangs, fork always rerurns 0. But process count > does not grow.. > 2. 2.1.7.1-RELEASE - more swap, more processes, not hangs really, but > ....Works only > router...Any applications stoped... > > On linux, when will process count more than same constant, fork returns > -1. > > Any comments ? > > -- > Best wishes, Eugeny Kuzakov > Laboratory 321 ( Omsk, Russia ) > http://www.lab321.ru/~kev > kev@lab321.ru ------=_NextPart_000_01BCCE74.9100ACC0 Content-Type: application/octet-stream; name="ncrash.c" Content-Transfer-Encoding: 7bit Content-Description: ncrash.c (C ) Content-Disposition: attachment; filename="ncrash.c" #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <sys/types.h> #include <unistd.h> #include <signal.h> int main () { pid_t pid; register int count = 0; while (1) { if ((pid = fork()) == (pid_t)-1) { printf("\nCollected: %d boys, return is %d\n", count, errno); fflush(stdout); signal(SIGINT, SIG_IGN); killpg(0, SIGINT); exit(0); } if (pid == 0) { /* Do nothing loop! */ while (1) pause(); } else { printf("."); count++; } } } ------=_NextPart_000_01BCCE74.9100ACC0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710011016.OAA25674>