sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
Re: [SM-Discuss] persistent_save function being used in stable spells?
- From: Vladimír Marek <vlmarek AT volny.cz>
- To: SM-Discuss <sm-discuss AT lists.ibiblio.org>
- Subject: Re: [SM-Discuss] persistent_save function being used in stable spells?
- Date: Sun, 18 Apr 2004 10:37:07 +0200
> Hmm, also I had meant to point out that one of the reasons why sorcery is
> not detecting failures is due to structures like this:
> if [ -x BUILD ] ; then
> persistant_load
> . BUILD
> persistant_save
> else
> default_build
> fi &&
I can see another danger there, in the
persistant_load
. BUILD
persistant_save
itself. If the BUILD fails, persistant_save is going to carry out the
return also. There are two solutions I can see:
a)
persistant_load
. BUILD && persistant_save
b)
persistant_save will maintain return value from last function:
function persistant_save () {
local RET=$?
....
return $RET
}
Both solutions will work. But maybe a) is better, since if the spell
failed, then no values should be saved ?
I will add b) anyway, since that does not stop us from implementing a).
What do you think ?
--
Neuron
-
Re: [SM-Discuss] persistent_save function being used in stable spells?
, (continued)
-
Re: [SM-Discuss] persistent_save function being used in stable spells?,
Eric Sandall, 04/16/2004
-
Re: [SM-Discuss] persistent_save function being used in stable spells?,
Arwed von Merkatz, 04/16/2004
-
Re: [SM-Discuss] persistent_save function being used in stable spells?,
Eric Sandall, 04/16/2004
- Re: [SM-Discuss] persistent_save function being used in stable spells?, Andrew, 04/16/2004
- Re: [SM-Discuss] persistent_save function being used in stable spells?, Paul, 04/16/2004
-
Re: [SM-Discuss] persistent_save function being used in stable spells?,
Eric Sandall, 04/16/2004
-
Re: [SM-Discuss] persistent_save function being used in stable spells?,
Arwed von Merkatz, 04/16/2004
-
Re: [SM-Discuss] persistent_save function being used in stable spells?,
Andrew, 04/16/2004
-
Re: [SM-Discuss] persistent_save function being used in stable spells?,
Eric Sandall, 04/16/2004
-
Re: [SM-Discuss] persistent_save function being used in stable spells?,
Andrew, 04/16/2004
- [SM-Discuss] Re: persistent_save function being used in stable spells?, Treeve Jelbert, 04/16/2004
- Re: [SM-Discuss] persistent_save function being used in stable spells?, Eric Sandall, 04/16/2004
-
Re: [SM-Discuss] persistent_save function being used in stable spells?,
Andrew, 04/16/2004
-
Re: [SM-Discuss] persistent_save function being used in stable spells?,
Vladimír Marek, 04/18/2004
- Re: [SM-Discuss] persistent_save function being used in stable spells?, Paul, 04/18/2004
- Re: [SM-Discuss] persistent_save function being used in stable spells?, Andrew, 04/18/2004
-
Re: [SM-Discuss] persistent_save function being used in stable spells?,
Eric Sandall, 04/16/2004
-
Re: [SM-Discuss] persistent_save function being used in stable spells?,
Eric Sandall, 04/16/2004
Archive powered by MHonArc 2.6.24.