Re: SEGFAULT if bash script make "source" for itself
From:
Steve Simmons
Subject:
Re: SEGFAULT if bash script make "source" for itself
Date:
Thu, 28 Aug 2014 12:43:16 -0400
On Aug 28, 2014, at 12:37 PM, Chris Down <chris@chrisdown.name> wrote:
> I really don't understand -- why is this unexpected? It's exactly what I'd
> expect to happen if you try to do something like that. It should not be
> disallowed to source yourself, that prevents people from doing things when
> *sensibly* sourcing their own script.
Agree. It's perfectly valid for a sourced script to check for an error
condition, fix the error, then re-source itself. Or for scripts to re-source
each other, each time with new parameters. Recursion is a win.