From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7029 invoked from network); 12 Nov 2003 14:02:28 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 12 Nov 2003 14:02:28 -0000 Received: (qmail 22461 invoked by alias); 12 Nov 2003 14:02:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19241 Received: (qmail 22447 invoked from network); 12 Nov 2003 14:02:20 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 12 Nov 2003 14:02:20 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.183.235] by sunsite.dk (MessageWall 1.0.8) with SMTP; 12 Nov 2003 14:2:20 -0000 Received: from EXCHANGE02.csr.com (unverified) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.10) with ESMTP id for ; Wed, 12 Nov 2003 14:02:20 +0000 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.5329); Wed, 12 Nov 2003 14:03:22 +0000 cc: zsh-workers@sunsite.dk Subject: Re: [BUG] some zsh completion fail in some cases if more than 9 jobs In-reply-to: "Peter Stephenson"'s message of "Tue, 11 Nov 2003 19:55:33 GMT." <7494.1068580533@csr.com> Date: Wed, 12 Nov 2003 14:02:16 +0000 Message-ID: <28524.1068645736@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 12 Nov 2003 14:03:22.0810 (UTC) FILETIME=[BBEA89A0:01C3A925] Peter Stephenson wrote: > Felix Rosencrantz wrote: > > I reported that I would double the value of MAXJOBS in my builds, > > which helped me. Though it might be nice to have a more dynamic solution. > > I've been looking at this. The big problem is the possibility that > something in the shell is holding onto a pointer to a job struct when > you reallocate the job table. I can get around this when freeing up by > relegating this to the top level. However, when we need to expand the > table we are deep down inside the shell before we have any inkling that > this is nececessary. > > It looks like we might get a way with it, since the only point where we > inititialiase a new job is at the top of execpline(), where it's > benign. However, I'm not at all sure we can guarantee the state of > functions lower down the call stack (where the current function is at the > top) at that point. This might take a lot of investigation. I may have been too pessimistic. The execpline() call is well-protected anyway (blocking SIGCLD), because in the past we could create jobs asynchronously (when traps were run directly from the signal handler). Also, the only extended places where a struct job is used for an extended period (we usually use the index into the table, which doesn't change) are in jobs.c and a chunk lower down in execpline(), which is essentially an extension to the job handling code to be smarter about signals for jobs running entirely within the shell. All these are low level; they don't spawn new jobs. So maybe it will work. I'm trying it locally before posting anything. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************