From owner-freebsd-current Sat Sep 14 20:20: 9 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76AC437B400; Sat, 14 Sep 2002 20:20:07 -0700 (PDT) Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09FBC43E42; Sat, 14 Sep 2002 20:20:07 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020915032006.KNTR26805.rwcrmhc52.attbi.com@InterJet.elischer.org>; Sun, 15 Sep 2002 03:20:06 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id UAA86537; Sat, 14 Sep 2002 20:12:33 -0700 (PDT) Date: Sat, 14 Sep 2002 20:12:32 -0700 (PDT) From: Julian Elischer To: Tim Robbins Cc: FreeBSD current users Subject: Re: Very important bug.. In-Reply-To: <20020915113448.A22689@dilbert.robbins.dropbear.id.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 15 Sep 2002, Tim Robbins wrote: > On Sat, Sep 14, 2002 at 04:59:48PM -0700, Julian Elischer wrote: > > > On Sat, 14 Sep 2002, Julian Elischer wrote: > > > > > > > > Well to all 2 of you that would ever considering running > > > FreeBSD 1.1 binaries on -current anyhow... > > > > > > > > > Everything goes along great until you hit a pid > 32768 > > > then everything stops > > > > Actually looks like it's the compiler doing sign extension > > on a short pid.. > > > > 32822 sh CALL fork > > 32822 sh RET fork 32823/0x8037 > > 32822 sh CALL setpgid(0xffff8037,0xffff8037) > > 32822 sh RET setpgid -1 errno 22 Invalid argument > > 32822 sh CALL getpgrp > > 32822 sh RET getpgrp 32822/0x8036 > > 32822 sh CALL wait4(0xffffffff,0xbfbff650,0x2,0) > > 32822 sh RET wait4 32823/0x8037 > > > > Looks like I need a 'compat' flag to fork that says > > "no pids over 32K please" :-) > > This might be a shell bug that I fixed a month or so ago.. see 1.17 to > jobs.h, 1.52 to jobs.c, and I think there were a few others. I don't know > why I've never seen the problem happen, though - sh shouldn't have been able > to create any child processes with pid's >32767. > no, this is a freeBSD 1.1 shell binary.. the problem is that -current returns a pid > 32K and the old ABI assumes a short(16bit), so it sign-extends when being passed back in. the only possible answer is to make -current not allocate PIDS > 32K when the parent is a legacy binary. > > Tim > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message