From owner-freebsd-questions Fri Mar 15 1:45:14 2002 Delivered-To: freebsd-questions@freebsd.org Received: from web13301.mail.yahoo.com (web13301.mail.yahoo.com [216.136.175.37]) by hub.freebsd.org (Postfix) with SMTP id CCA5E37B400 for ; Fri, 15 Mar 2002 01:44:53 -0800 (PST) Message-ID: <20020315094453.63286.qmail@web13301.mail.yahoo.com> Received: from [167.230.227.236] by web13301.mail.yahoo.com via HTTP; Fri, 15 Mar 2002 01:44:53 PST Date: Fri, 15 Mar 2002 01:44:53 -0800 (PST) From: Greg Quinlan Reply-To: gwq_uk@yahoo.com Subject: Fwd: IBCS2 / SCO binary fork PID limitation. To: David Banning Cc: FreeBSD-Questions@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi All, Firstly, how can I submit this to FreeBSD-bugs? David, I know it has been a long time since you submitted the issue you had ... Thu, 12 Jul 2001 02:05:39 -0500 which was; > "Well this one may be a tough one. > > I am running an SCO binary which is relational database. > > I runs fine normally under ibcs2, but a couple of larger programs I run > crash _only_ when I select a large number of records to process......" > But if you read this below it may have helped you back then. > Subject: IBCS2 binary fork PID limitation. > Date: Thu, 14 Mar 2002 11:27:32 -0000 > > Problem: > COFF (IBCS2) binaries from SCO UNIX (running on FreeBSD 4.5-S) > that fork processes, have an upper PID (process ID) limitation. > The fork-ed PID can only be a maximum of 32767, but FreeBSD 4.5-S > allows 99999! > > Details: > short = ( 2^16, -1 bit for sign, +/- 2^15) = ~ 32768 > > From the command prompt on the lastest fully patched version of > SCO UNIX Open Server R5.0.X > > sco# grep pid /usr/include/sys/proc.h > short p_pid; /* unique process id*/ > short p_ppid; /* process id of parent*/ > short p_epid; /* effective pid; normally > > It appears that any SCO (IBCS2) binary process that "forks a child" > and exceeds the upper limit of "short" will return the error "can't > fork process" or "can not fork process", and crash. > > eg. If the PID returned by fork() is say, 41000, then the effective > "cast" to (short)pid will give an incorrect value for the child > process. > > Work around: > Edit /sys/sys/proc.h, change > > #define PID_MAX 99999 > #define NO_PID 100000 > > to 32767 and 32768, rebuild your kernel, and reboot. > > (courtesy of FreeBSD-Questions) > > Severity: > Low __________________________________________________ Do You Yahoo!? Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message