[vm][unix][bug][fix][OSProcess] Bad file descriptor bug when decapitating/recapitating the squeak display

Stephen Pair spair at advantive.com
Thu Feb 14 14:07:25 UTC 2002


> On Thu, Feb 14, 2002 at 01:14:24AM -0500, Stephen Pair wrote:
> > The Bug: Using OSProcess to decapitate and recapitate a 
> display will 
> > often cause a multitude of "select: Bad file descriptor" errors.  
> > Also, socket serving becomes un-reliable after encountering these 
> > errors.
>  
> Wow, somebody is actually using the "recapicate" hack? cool. 
> Just out of curiosity, what are you using it for (a headless 
> Swiki perhaps)?

Yes, well Swiki.net to be exact.  I'm working toward an initial release
of the Swiki.net code (probably in a month or two).  We've just moved
off of Windows and onto Linux and I'm using the capitation cabilities to
make Linux Init.d style scripts to start and stop swiki.net in headless
mode.  Then when I need to gain access to the Squeak desktop (for
maintenance, debugging, etc), I recapitate it to the current DISPLAY
using:

	service swikinet recapitate

Works great!  Your OSProcess package is really nice!  I meant to sing
praises in the original email, but forgot...very nice addition to
Squeak!

> > The attached solution solves the issue by adding a call to
> > aioStopHandling() from forgetXDisplay() (in sqXWindow.c).  
> This stops 
> > the VM from attempting to poll the (now closed) file descriptor 
> > associated with the X display.
> > 
> > This change is based on the sourceforge VM sources.  How 
> does one go 
> > about getting it checked into SF?
> > 
> > - Stephen
> 
> I don't seem to have the exact version of sqXWindow.c that 
> you are starting with, but assuming that this is a one line 
> addition to the file, the right thing to do would be:

It's the current one on SF (at least current as of about 24 hrs ago).
I'll do the diff right away.

- Stephen




More information about the Squeak-dev mailing list