Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug with parameter module



Zefram wrote:
> Peter Stephenson wrote:
> >The shell hangs.  It seems that executing fn uses some wrapper associated
> >with the parameter module which then won't unload.
> 
> Just ignore errors; *attempt* to unload
> each module, but leave it if it doesn't unload.

That sounds reasonable.  I think the reason we need at least to attempt to
unload modules is that in general we don't know what code that can trigger;
it could in principle be something required for the shell to exit cleanly.
But I don't know if that's true (or ever will be true) in practice.  This
case is something of a counterexample to that attitude.

I found another problem while attempting to work around this.

zsh -c 'zmodload parameter; zmodload -u parameter
fn() { zmodload parameter; zmodload; }; fn'

Only the pseudo-module `zsh' shows up; parameter isn't there in the
function.  If you take away the code on the first line, it is.

This stuff makes scripts using the parameter module rather icky at the
moment, and as I'm planning on using $options to keep track of options in
the test system, it's a bit of a drag.

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>



Messages sorted by: Reverse Date, Date, Thread, Author