Date: Fri, 15 Mar 2002 01:44:53 -0800 (PST) From: Greg Quinlan <gwq_uk@yahoo.com> To: David Banning <david@skytrackercanada.com> Cc: FreeBSD-Questions@FreeBSD.org Subject: Fwd: IBCS2 / SCO binary fork PID limitation. Message-ID: <20020315094453.63286.qmail@web13301.mail.yahoo.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020315094453.63286.qmail>