From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@9fans.net From: "Fazlul Shahriar" Date: Tue, 1 Jul 2008 17:59:51 -0400 In-Reply-To: <20080701190905.B88951E8C51@holo.morphisms.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] rc bug Topicbox-Message-UUID: d527e19a-ead3-11e9-9d60-3106f5b1d025 I saw something similar before, but unfortunately, the patch below doesn't fix it. cpu% fn 'file?' { test -f $* } cpu% 'file?' /LICENSE cpu% echo $status cpu% 'file?' /foo cpu% echo $status test 145387: false cpu% rc cpu% 'file?' /LICENSE rc: can't open /env/fn#file?: bad character in file name: '/env/fn#file?' file?: '/bin/file?' file does not exist cpu% 'file?' /LICENSE file?: '/bin/file?' file does not exist cpu% unicode  0001 cpu% >> it appears something is going wrong >> with rc's local assignments. ifs has the usual >> value. >> >> ; font=/lib/font/bit/cyberbit/mod*.font rio >> rio: can't access /lib/font/bit/cyberbit/mod*.font: bad character in file name: '/lib/font/bit/cyberbit/mod*.font' >> ; unicode  >> 0001 >> ; echo /lib/font/bit/cyberbit/mod*.font >> /lib/font/bit/cyberbit/mod14.font >> ; x=/lib/font/bit/cyberbit/mod*.font >> ; whatis x >> x=/lib/font/bit/cyberbit/mod14.font > > % diff -c /n/sources/plan9/sys/src/cmd/rc/exec.c . > /n/sources/plan9/sys/src/cmd/rc/exec.c:751,759 - ./exec.c:751,761 > } > deglob(runq->argv->words->word); > runq->local = newvar(strdup(runq->argv->words->word), runq->local); > - runq->local->val = copywords(runq->argv->next->words, (word *)0); > - runq->local->changed = 1; > poplist(); > + globlist(); > + runq->local->val = runq->argv->words; > + runq->local->changed = 1; > + runq->argv->words = 0; > poplist(); > } > > %