Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Sep 2002 20:12:32 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Tim Robbins <tjr@FreeBSD.ORG>
Cc:        FreeBSD current users <current@FreeBSD.ORG>
Subject:   Re: Very important bug..
Message-ID:  <Pine.BSF.4.21.0209142005130.82711-100000@InterJet.elischer.org>
In-Reply-To: <20020915113448.A22689@dilbert.robbins.dropbear.id.au>

next in thread | previous in thread | raw e-mail | index | archive | help


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0209142005130.82711-100000>