[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't source itself?
From: |
Chet Ramey |
Subject: |
Re: Can't source itself? |
Date: |
Thu, 5 Jul 2001 08:48:33 -0400 |
> I posted the "Possible source bug?" a few weeks ago, but no one responded.
> Is it expected behaviour to segfault when a script tries to source itself
> in? As in this script, named foo.sh:
>
> #!/bin/bash
> . ./foo.sh
>
> This will segfault upon execution. Infinite recursion should be more
> reasonable, or preferably that it recognices itself and returns an error
> message.
It does recurse infinitely. Eventually, you exceed your resource limit
on stack size and segfault.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)
Chet Ramey, CWRU chet@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/