From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10045 invoked from network); 27 Jul 2000 08:12:53 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Jul 2000 08:12:53 -0000 Received: (qmail 8952 invoked by alias); 27 Jul 2000 08:12:48 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12399 Received: (qmail 8945 invoked from network); 27 Jul 2000 08:12:47 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "ZSH workers mailing list" Subject: Anybody objects to the following change in createparamtable()? Date: Thu, 27 Jul 2000 12:12:29 +0400 Message-ID: <000401bff7a2$681b5e90$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal In createparamtable() (copy environment loop): ššif ((!(pm = (Param) paramtab->getnode(paramtab, iname)) || šš !(pm->flags & PM_DONTIMPORT) && !(pm->flags & PM_EXPORTED)) && šš (pm = setsparam(iname, metafy(str + 1, -1, META_DUP)))) { šš *str = '='; šš pm->flags |= PM_EXPORTED; .... The reason is, if we have duplicated environment entries, last one wins and call to setsparam() will try to modify environment in the middle of traversing it I'd prefer, if check for PM_EXPORTED comes first - if parameter is already exported, just skip any environment with the same name. At this point the only exported parameters are the ones resulted from importing environment so it should be safe. -andrej Have a nice DOS! B >>