diff options
author | Casey Dahlin <cdahlin@redhat.com> | 2008-11-07 15:16:31 -0500 |
---|---|---|
committer | Casey Dahlin <cdahlin@redhat.com> | 2008-11-07 15:16:31 -0500 |
commit | 174313860aa680c063b7fd2783fe6a7b637d64d4 (patch) | |
tree | eaa37352a7aaa1adfba6cbca763c9c79c27f468d /state.rb | |
parent | 2c628ecf2332b6d2a6df59e215b3777d2fddbc35 (diff) | |
download | upstate-174313860aa680c063b7fd2783fe6a7b637d64d4.tar.gz upstate-174313860aa680c063b7fd2783fe6a7b637d64d4.tar.xz upstate-174313860aa680c063b7fd2783fe6a7b637d64d4.zip |
Add check for forking a live state.
States which are up should never fork.
Diffstat (limited to 'state.rb')
-rw-r--r-- | state.rb | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -133,6 +133,7 @@ class State # Duplicate this class and bring the duplicate up with the given hold attached def fork(hold) + raise Consistency Fault, "Fork of live state" unless @status == :down new_one = self.clone new_one.instance_eval do @holds = Set.new [hold] |